divest_one_coin
This entrypoint is designed to remove liquidity from a specific DEX pool in one underlying token.
Call parameters
Field | Type | Description |
---|---|---|
pool_id |
| pool identifier. |
shares |
| amount of LP tokens to be burnt. |
token_index |
| index of token to be received. |
min_amount_out |
| amount of token to be received. |
deadline |
| dealine of current operation. |
receiver |
| optional, address of the receiver of the LP tokens. If not provided the |
referral |
| optional, address of the referral of the current operation. If not provided the |
The parameter shares
provided to call, which represents the amount LP tokens would be burnt in full. So, if you want to burn more LP tokens by value than available reserves of the selected underlying token then you could lose some of your liquidity.
Last updated