Liquidations

Margin Trade enforces transparent, onchain liquidation, backstop and auto-deleveraging mechanisms to ensure the solvency of the system under all market conditions.

Liquidations occur when a trader’s account equity (collateral + unrealized PnL) falls below the required maintenance margin.

All liquidation and deleveraging logic is executed directly on-chain within the Margin Trade clearing layer, ensuring deterministic, transparent, and verifiable outcomes.

Liquidations use the mark price, not the last traded price, to avoid unnecessary liquidations caused by short-term volatility or thin order books.


Overview

When market prices move against a trader, unrealized losses reduce account equity. Margin Trade uses three escalation stages:

  1. Liquidation threshold: equity falls below maintenance margin

  2. Backstop threshold: equity falls below 2/3 of maintenance margin

  3. ADL: residual risk remains after backstop handling


Liquidation Process

  1. Trigger Condition

    account_equity < maintenance_margin_required

    At this threshold, the account becomes liquidatable.

    • Positions are eligible for liquidation

    • The system may attempt to reduce or close exposure through the order book

    • Traders are strongly encouraged to reduce risk manually (add collateral or close positions)

  2. Partial Liquidations (Order-Book Based)

    To reduce market impact and allow recovery where possible, Margin Trade supports partial liquidations.

    • For large liquidatable positions, only a portion of the position is initially sent as an on-chain market order

    • Partial liquidation reduces position size and required maintenance margin

    • If equity recovers above maintenance margin after partial execution, liquidation halts

    • Any remaining collateral above maintenance margin is retained by the trader

    After a partial liquidation event:

    • The system enforces a cooldown window

    • During this period, further liquidation attempts may escalate to full liquidation if equity continues to deteriorate

  3. Execution and Settlement

  • Liquidations are processed atomically within the same block.

  • Orders are matched against the resting order book by price-time priority, just like normal trades.

  • All collateral above maintenance margin is returned to the trader after settlement.

  • Any remaining unrealized loss is absorbed by the liquidation process.

Backstop Liquidation (Margin Trade Liquidity Provider, MLP Takeover)

If the account equity continues to deteriorate and reaches this threshold, the Margin Trade Liquidator Vault (MLP) may take over the affected positions

  • Maintenance margin is not returned to the trader during backstop liquidation

  • This buffer protects the protocol against adverse execution and gap risk

Because the MLP requires a buffer to remain profitable on average:

  • The trader’s positions and associated margin are transferred to the MLP

  • The MLP assumes full responsibility for managing, unwinding, or hedging the risk

  • The trader no longer controls the liquidated positions

The Margin Trade Liquidator Vault (MLP) serves as the system’s backstop risk absorber.

  • It takes over positions only after deep distress (below 2/3 maintenance margin)

  • It unwinds positions gradually and strategically to minimize market impact

  • On average, backstop liquidations are expected to be profitable for the vault

Rather than concentrating liquidation profits with the protocol operator or privileged actors, this design allows liquidation PnL to be transparently realized by the vault strategy.

Finally, under extreme market conditions where the MLP is unable to absorb or unwind the risk, residual losses would otherwise create bad debt. In these rare cases, the system triggers Auto-Deleveraging (ADL) as a last-resort mechanism to ensure no bad debt remains.

Condition
Action

Equity ≥ Maintenance Margin

Positions remain open

Equity < Maintenance Margin

Positions become liquidatable

Equity < 2/3 Maintenance Margin

MLP take over

Vault insufficient

ADL triggered


Mark Price in Liquidations

Liquidations are based on the mark price, not the last traded price.

The mark price:

  • Combines external oracle data and onchain order book information

  • Is smoothed to resist manipulation and transient volatility

  • Produces a fair and conservative valuation for liquidation decisions

This prevents unnecessary liquidations due to short-term volatility or thin order book conditions. See Price Feeds for a detailed explanation of the mark price calculation.

See Price Feeds for full details on mark price construction.


Computing Liquidation Price

An estimated liquidation price is shown in the interface for each open position. This estimate adjusts dynamically with unrealized PnL, funding payments, and other open positions (in cross margin).

The general conceptual formula is:

Where:

  • side = 1 for longs, -1 for shorts

  • margin_available = account_equity - maintenance_margin_required

  • maintenance_leverage = 1 / maintenance_margin_rate

This formula reflects the point at which total account equity equals the maintenance requirement. Because Margin Trade uses cross margin, liquidation price depends on your total account equity, not only on individual position margin.

Maintenance margin rates vary by market. For current per-market limits, see Markets. For the margin model, see Margin.

Best Practices for Traders

  • Monitor your margin ratio frequently in the account panel.

  • Avoid over-leveraging; higher leverage reduces your liquidation buffer.

  • Use stop losses to proactively exit before liquidation.

  • Keep extra USDC collateral in your account to maintain a safe margin ratio during volatility.

Last updated