Liquidation
Liquidation closes a position that can no longer meet its maintenance margin. This page explains when it triggers, what happens to your position, and how to read the numbers.
When it triggers
Your account is re-evaluated every block. Liquidation starts when the margin ratio falls below 1.0, computed per margin mode:
Cross (account-wide):
balance + cross unrealized PnL
margin ratio = ─────────────────────────────────────────────── < 1.0
cross maintenance margin + cross liquidation fee
Isolated (per position):
position margin + unrealized PnL
margin ratio = ───────────────────────────────────── < 1.0
maintenance margin + liquidation feewhere:
balance = available balance + balance frozen by open orders
maintenance margin = position notional × MMR (MMR from your size tier)
liquidation fee = position notional × market taker fee rate
position notional = position size × mark priceTwo details are easy to miss:
- The denominator includes a liquidation fee reserve, so liquidation starts slightly earlier than a plain "equity = maintenance margin" comparison would suggest.
- In cross mode the numerator is your balance plus cross unrealized PnL. Margin locked in isolated positions is not part of it, so isolated collateral cannot rescue a cross account.
MMR is the maintenance margin rate, which varies by tier — see Margin & leverage.
The bankruptcy price is the mark price at which the position's margin is fully consumed, including the fee to close it — the point where your margin balance reaches zero.
What happens to your position
Once triggered, the protocol runs a fixed, on-chain sequence:
- Decision. The engine computes how much of the position must be taken over and picks the liquidator account. Positions in a low margin tier are always closed in full; from tier 3 upward the engine may run a partial liquidation instead, reducing you to the size cap of the tier below.
- Cancel orders. In cross mode, all of your open perpetual orders are cancelled (spot and outcome orders are untouched). In isolated mode, only orders on the liquidated instrument are cancelled.
- Takeover. A liquidator account takes over the position at the bankruptcy price.
- Market disposal. The liquidator submits one reduce-only
IOCorder, priced past the bankruptcy price — below it when selling, above it when buying — so that resting liquidity can absorb the position instead of leaving the order unfilled. How far past is configured per market. If the order fills completely, the liquidation ends here. - ADL. Whatever is left after market disposal is closed against opposing traders through auto-deleveraging.
Every step emits an on-chain event, so a liquidation can be fully reconstructed and audited.
What you keep
- Isolated: only the liquidated position and the margin assigned to it are handed to the liquidator account. Your cross margin and other positions are untouched.
- Cross: all cross positions share one equity pool, so liquidation is assessed account-wide — losses on one position can trigger liquidation while another is still healthy.
- Because takeover happens at the bankruptcy price, the maintenance-margin buffer is not returned to you.
- After a partial liquidation you keep the remaining position; only the amount needed to get back inside a safer tier is taken over.
Reducing your risk
- Add margin (isolated) or reduce size to push the liquidation point further from the mark.
- Lower leverage → smaller position for the same margin → more buffer.
- Watch the mark price, not the last price — see Mark vs. oracle price.
- Use
getLiquidationPricesvia the Info API to estimate how a proposed order would change liquidation prices; for the live liquidation price, read your current position state.