Skip to main content

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.

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 — 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):
health ≤ MMR_BPS
Health is computed from your effective equity, the market’s max leverage, and your position size:
health         = effective_equity × max_leverage / size
effective_equity = collateral + pnl − funding_charge − borrowing_fee
Three numbers to remember:
ConstantValue
MMR_BPS20 bps (0.2% of position size)
MAX_LEVERAGE250×
Liquidator reward50 bps of remaining collateral (capped per call)
Losses round away from zero — the protocol always rounds in its own favor, so the breakpoint is a hair earlier than a naive calculation suggests. If you want to avoid getting clipped, watch your buffer in the position panel and top up collateral early. See Margin management for how to add or remove collateral mid-trade.
At the 250× cap the initial margin requirement is 40 bps (0.4%) and the maintenance margin is 20 bps (0.2%), leaving a fresh max-leverage position roughly 0.2% of price movement between entry and liquidation — before fees and funding, and less in practice. Trade at lower leverage for any real cushion.
Overnight gap risk. Because Parquet only quotes during US Regular Trading Hours, you cannot be liquidated while the market is halted — but you also can’t close or adjust margin. A large overnight gap (earnings prints, geopolitical news, weekend headlines) is realized at the next session’s first oracle update. If the gap moves the price past your liquidation level, your position is eligible to be liquidated the instant the session reopens, with no opportunity to react. Size overnight exposure with this in mind.

What the liquidator earns (dual CPI)

Inside the liquidate instruction, perp_engine fires two release_and_settle CPIs against pool_program:
  1. Trader settlement. Any remaining equity — collateral plus realized PnL minus funding and borrow fees — is paid back to the trader’s vault.
  2. Liquidator reward. A bounty equal to 50 bps of the remaining collateral is paid to whoever called liquidate, capped at the max_collateral_loss runtime 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.
You won’t see queue clawback unless you specifically opened a position funded from the payout queue. For ordinary collateral deposits, only the dual CPI above applies.