-
Notifications
You must be signed in to change notification settings - Fork 99
feat: remove omnipool stable position #1300
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
base: master
Are you sure you want to change the base?
Conversation
|
Crate versions that have not been updated:
Crate versions that have been updated:
Runtime version has been increased. |
|
Quick benchmark at commit e1e25b3 has been executed successfully. |
| [package] | ||
| name = "pallet-omnipool-liquidity-mining" | ||
| version = "2.7.1" | ||
| version = "2.8.0" |
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.
it should be really be 3.0.0 because it breaks the api by adding extra parameter.
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.
does it really break the API? I mean, it is just an optional param in the end, AFAIK it doesn't break API.
| /// other pallets to call it and receive the transferred amount. | ||
| #[require_transactional] | ||
| pub fn do_remove_liquidity_with_limit( | ||
| origin: OriginFor<T>, |
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.
account instead of origin. origin can be ensured just before.
also usage of this in the omnipool-lm favors this approach.
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.
the thing is that on_liquidity_changed requires origin, so i think we need to keep it as is, unfortunately.
| fn remove_liquidity_one_asset( | ||
| who: AccountId, | ||
| pool_id: AssetId, | ||
| asset_id: AssetId, | ||
| share_amount: Balance, | ||
| min_amount_out: Balance, | ||
| ) -> Result<Balance, DispatchError>; | ||
|
|
||
| fn remove_liquidity( | ||
| who: AccountId, | ||
| pool_id: AssetId, | ||
| share_amount: Balance, | ||
| min_amounts_out: Vec<AssetAmount<AssetId>>, | ||
| ) -> Result<(), DispatchError>; |
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.
this does not make much sense here. the trait is called AddLiquidity.
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.
good point. Since this trait is only used in omnipool liqudity mining, i would rename it to "StableswapLiquidityMutation'
Fixes: #1294
TODOS: