divest_liquidity
An entrypoint for liquidity divestment from the specific liquidity pool (pair). Also it votes for the users' bakers in case of liquidity divestment from TOK/TEZ pools.
Call parameters
pair_id
token_id_t (nat)
Identifier of the liquidity pool (pair)
min_token_a_out
nat
The minimum number of token A that the user agrees to
min_token_b_out
nat
The minimum number of token B that the user agrees to
shares
nat
Amount of LP tokens to use in time of divestment
liquidity_receiver
address
Receiver of tokens A and tokens B
candidate
key_hash
Baker for voting (is used only in time of divestment from TOK/TEZ exchanges)
deadline
timestamp
The time until which the transaction remains valid and will not be rejected
Usage
Errors
108
- pair (pool) with the specifiedtoken_id
not listed.109
- pair doesn't have a liquidity.114
- insufficient liquidity.115
- dust output (zero tokens amount expected).116
- high expectations of output tokens.136
- reentrancy.142
- wrong reserves state after execution of the operation.144
- action outdated (the time until which the transaction remained valid was passed).412
- non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).
Last updated