Liquidations exist because losing trades eventually run out of collateral. When your position moves against you far enough that the remaining equity can’t cover the maintenance margin, the protocol needs to close you out before the loss spills onto liquidity providers. Anyone can trigger this —Documentation Index
Fetch the complete documentation index at: https://docs.parquet.exchange/llms.txt
Use this file to discover all available pages before exploring further.
liquidate is a permissionless instruction, so in practice keepers race to call it the instant a position becomes eligible.
When you get liquidated
Your position is liquidatable when its health falls to or below the maintenance margin ratio (see MMR):| Constant | Value |
|---|---|
MMR_BPS | 20 bps (0.2% of position size) |
MAX_LEVERAGE | 250× |
| Liquidator reward | 50 bps of remaining collateral (capped per call) |
What the liquidator earns (dual CPI)
Inside theliquidate instruction, perp_engine fires two release_and_settle CPIs against pool_program:
- Trader settlement. Any remaining equity — collateral plus realized PnL minus funding and borrow fees — is paid back to the trader’s vault.
- Liquidator reward. A bounty equal to 50 bps of the remaining collateral is paid to whoever called
liquidate, capped at themax_collateral_lossruntime argument the caller passes in.
max_collateral_loss is the caller-supplied ceiling that lets the keeper bound how much of the trader’s residual equity the protocol may spend on the bounty plus settlement. In practice the keeper picks a value that leaves enough headroom to clear bad debt while still incentivizing the call.
Because the reward is a caller-supplied cap and
liquidate is permissionless, the keeper system competes with itself: whoever lands the transaction first collects. You don’t pay the liquidator out of pocket — it comes out of your remaining equity.v4 queue clawback
If your position was opened against collateral drawn from the LP payout queue (i.e.position.collateral_from_queue > 0), liquidation has one extra step. Before the lien on queued collateral is released, liquidate walks your Pending queue entries in FIFO order and voids them via CPI until voided_sum ≥ collateral_from_queue. That prevents queue-drawn collateral from silently turning into bad debt sitting on LPs.