feat: add wrappers for dynamically rebased tokens#935
feat: add wrappers for dynamically rebased tokens#935gregdhill wants to merge 1 commit intointerlay:masterfrom
Conversation
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
sander2
left a comment
There was a problem hiding this comment.
Closes #926
I don't think it does? It adds some, but not all, of the required code, it seems to me? Rather than merging this as-is, I think I'd like this pr to include the rest of the required changes since it'll also be easier to review that way. That is, instead of having multiple PRs, having a single PR with multiple commits
| } | ||
| } | ||
|
|
||
| pub struct Combiner<AccountId, TestKey, A, B>(PhantomData<(AccountId, TestKey, A, B)>); |
There was a problem hiding this comment.
could you add some docstrings to each of these structs explaining what they do?
Well technically we can close that issue anyway since it is not possible to support imbalanced assets using Curve v1.
No I think it does, the requirement is that we can link assets dynamically (in the oracle pallet) to convert to some other asset and back again which it does. The only thing missing is to consume these wrappers in the runtime code. |
Can you add this, and also some tests to show that it's working? |
|
This implementation is not correct, we need to re-balance the pool anytime we would interact with it - not just on deposit / withdrawal. See https://github.com/nutsfinance/stable-asset/blob/82577aefff91afb7c6df00d4193e4c61b4c9c1c1/lib/stable-asset/src/lib.rs#L1326 |
|
Succeeded by #1063 |
Adds wrappers inspired by those in
orml-tokens(since they don't implement theMultiCurrencytrait) to dynamically rebase tokens if a pairing exists in the Oracle pallet.Closes #926