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’s open positions, unrealized losses reduce their account equity.

Margin Trade defines two critical thresholds:

  1. Maintenance Margin Threshold

    The minimum equity required to keep positions open.

  2. Backstop Liquidation Threshold (2/3 Maintenance Margin)

    A safety threshold at which positions may be taken over by the Margin Trade Liquidator Vault (MLP) if market-based liquidation cannot be completed safely.

This design prioritizes market-based unwinding when possible, capital preservation for traders, and system-wide solvency under extreme conditions. If equity drops below the maintenance margin threshold, the system will begin full liquidation of the affected positions.

  • Margin Trade uses full liquidations. Once triggered, the entire open position is closed automatically at the current mark price through onchain market orders.

  • Cross margin accounts: Since all Margin Trade accounts currently use cross margin, liquidation affects the account’s entire trading balance. All open positions share the same margin pool and will be closed together if total equity falls below the maintenance level.


Liquidation Process

  1. Trigger Condition

    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. Market Liquidation Orders The clearing engine submits onchain market orders to close the position(s) in full. These execute against the resting order book using mark price for fair value validation.

  3. Execution and Settlement

    • Liquidations are processed atomically within the same block.

    • Orders are matched 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 and Liquidation Thresholds

The maintenance margin rate is approximately half of the initial margin rate at max leverage. Typical values:

Asset
Max Leverage
Maintenance Margin

BTC-USDC

20×

2.5 %

ETH-USDC

20×

2.5 %

SOL-USDC

20×

2.5 %

NVDA-USDC

10×

5.0 %

XAU-USDC (Gold)

10×

5.0 %

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