Hi @HeliosFz
Thanks for waiting, I’m just back from vacation.
In this case, the steps of operations from multiple different deposits may be the same. Is the field identifying which deposit the operation belongs to ‘purpose’, or does it require adding a new field?
Good question.
The purpose field doesn’t really disambiguate different operation instances, as it just provides some context to the human auditor to hint at what this operation was trying to accomplish.
But should be able to disambiguate operations using timestamp_ns, since transactions do not interleave. At least that’s the case in our reference implementation.
We could consider adding another field, e.g., transaction_id. Do you think that would help?
So the deposit method is not simply transferring assets to the treasure manager, but directly recharging assets into DEX, right?
Short answer - yes.
Note that the treasury manager itself doesn’t have access to the treasury tokens, but when an SNS executes a deposit for a treasury manager extension, it ensures that the required assets are available to it. So the treasury manager extension’s deposit function serves as a notification endpoint for telling the extension that it’s now safe to assume that the tokens are made available to it, in which case, they are to be forwarded to the DEX.
I still don’t understand the meaning of fee_collector. Is it just a transfer fee for tokens, or does it need to be paid as a management fee to the treasure manager? What is the charging mechanism?
The treasury manager should not take up any fees for itself. As an extension canister, it should be registered with and controlled by the SNS, and it is thus part of the DAO.
The fee_collector is just the accumulated amount of all ledger fees along the execution of a particular operation, e.g., deposit. Since the low-level ledger transactions are an implementation detail, from the p.o.v. of the SNS, it would not be obvious to the end users how many ledger fees to expect. Taking into account the possibility that a ledger changes its fee mid-operation (unlikely, but still possible), keeping track of these internal fees aids the accounting for a human auditor.
So adding liquidity and other business logic needs to be written as SNS methods, and then registered by the project party into SNS, right?
I’m not 100% sure what you mean by SNS methods. If you refer to custom proposals (a.k.a. generic functions), then the answer is no. Instead, we will offer a new (hopefully, better) mechanism to call extension operations via a new proposal type called ExecuteExtensionOperation. When an extension is registered, its operations should be made available via ExecuteExtensionOperation proposals immediately. In particular, after registering a Treasury Manager extension, SNS users can submit ExecuteExtensionOperation proposals for its deposit and withdraw operations.
Timed refunding means that there will be no fund accumulation in the treasure manager, right?
Exactly.
Is the triggering frequency customized?
Not in the reference implementation we’re working on (we want to keep the configuration as simple as possible, as thus we plan to hard code the periodic task frequency to once an hour.