-
Notifications
You must be signed in to change notification settings - Fork 99
Description
It would be great to have extrinsic(s) which will calculate for UI necessary balances when removing stableswap shares from either omnipool position or omnipool farming position.
This is currently handled in 3 signing steps.
Revert OmnipoolLiquidityMining.addLiquidityStableswapOmnipoolAndJoinFarms
depositId
list of farms (because you can be in multiple farms)
Omnipool liquidity (in farm)=>omnipoolLiquidityMining.withdrawShares(args)=>Omnipool LP position(not in farm)=>omnipool.removeLiquidityWithLimit(args)=>stableswap shares=>remove proportionally/single asset=> assets
example of proportional liquidity removal (from stableswap)l:
{
"args": {
"pool_id": "102",
"share_amount": "9,868,770,921,034,374,665",
"min_amounts_out": [
{
"assetId": "10",
"amount": "4,917,091"
},
{
"assetId": "22",
"amount": "4,983,877"
}
]
},
"method": "removeLiquidity",
"section": "stableswap"
}
example of single side removal(from stableswap):
{
"args": {
"pool_id": "102",
"asset_id": "22",
"share_amount": "9,868,770,921,034,374,665",
"min_amount_out": "9,898,643"
},
"method": "removeLiquidityOneAsset",
"section": "stableswap"
}
- omnipool position in farm => omnipool position (not in farm)=>stableswap shares=>asset
- omnipool position (not in farm)=>stableswap shares=>asset
2 options how to withdaw shares from stablepool :
- proportionally
- single asset