remove_liquidity
Burn LP shares to schedule a counterparty-vault withdrawal (subject to cooldown).
The release value is computed as
effective_equity × (shares_to_burn / effective_supply) at burn time, but the
USD is not credited immediately — the cooldown prevents LPs from front-running
known losses. See protocol book: perps/5-vault §3.
Signature
def remove_liquidity(self, shares_to_burn: int) -> dict[str, Any]Example
from dango.exchange import Exchange
from dango.utils.types import Addr
exchange = Exchange(wallet, base_url, account_address=Addr("0x..."))
# Burn 50 LP shares
exchange.remove_liquidity(50)Parameters
shares_to_burn — int. Number of shares to burn (Uint128). Must be a positive int (not bool, not float). Raises TypeError on non-int, ValueError on zero / negative.
Returns
dict[str, Any] — the BroadcastTxOutcome envelope. The actual USD release happens after the vault cooldown period elapses.
Notes
- The vault cooldown period is in
perps_param'svault_cooldown_periodfield. - Pending unlocks surface in
user_state'sunlockslist.
See also
add_liquidity— counterpart that mints sharesuser_state— inspectunlocksto track pending releases