-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add wrappers for dynamically rebased tokens #935
Conversation
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 theMultiCurrency
trait) to dynamically rebase tokens if a pairing exists in the Oracle pallet.Closes #926