Futures Trading Liquidation Guide

1. What is Liquidation?

Liquidation is a risk management mechanism where the exchange forcibly closes a user's open positions to prevent the account balance from falling below zero. This occurs when the account's Equity drops below the minimum required amount, known as the Maintenance Margin.


2. Liquidation Trigger Criteria (Margin Ratio)

Liquidation is triggered in real-time based on the Margin Ratio.

  • Margin Ratio Formula: Margin Ratio = Total Maintenance Margin ÷ Equity
  • Liquidation Trigger Condition: Margin Ratio ≥ 100% (1.0)

If your Equity (Wallet Balance + Unrealized PNL) becomes equal to or less than your Total Maintenance Margin, the liquidation process begins immediately.


3. The Liquidation Process

When the Margin Ratio reaches 100%, the liquidation engine acts in two phases to protect your remaining assets.

  • Phase 1: Pre-Liquidation Order Cancellation (Cancel Only)
    • If your Margin Ratio hits 100% and you have pending Cross Margin orders, the engine will first cancel all pending orders before liquidating any positions.
    • Canceling pending orders releases the margin locked for those orders, which is added back to your Available Balance and may help lower your Margin Ratio back to a safe level.
  • Phase 2: Position Liquidation (Forced Closure)
    • If there are no pending orders, or if the Margin Ratio remains at or above 100% even after all pending orders have been canceled, the engine will proceed to forcefully close your active positions.

4. Liquidation Target Selection

If you hold multiple open positions, the engine does not close all of them at once. Instead, it prioritizes the most risky positions based on the following rules:

  1. 1st Priority: The position with the largest Unrealized Loss (PNL).
  2. 2nd Priority: If the losses are identical, the position with the largest Notional Value (Position Size × Mark Price) is targeted first.

5. Partial Liquidation & Target Recovery Ratio

To protect users from losing their entire portfolio, our engine utilizes a "Partial Liquidation" system. The engine will liquidate the riskiest positions one by one and recalculate the Margin Ratio. The liquidation process stops as soon as the Margin Ratio recovers to a safe level, which is set at 80% (Target Margin Ratio: 0.8).


💡 [Example Scenario]

User A's Cross Margin Account Status

  • Wallet Balance: 1,000 USDT
  • Open Positions :
    • BTCUSDT Long: Maintenance Margin 600 USDT / Current Unrealized PNL -400 USDT
    • ETHUSDT Short: Maintenance Margin 500 USDT / Current Unrealized PNL -200 USDT
  • Total Maintenance Margin: 1,100 USDT (600 + 500)
  • Equity: 400 USDT (Wallet Balance 1000 - Total Loss 600)

[Liquidation Engine Workflow]

  1. Risk Scan: Margin Ratio = 1,100 / 400 = 275% (2.75) ➡️ Exceeds 100%, Liquidation Triggered!
  2. Target Selection: The BTCUSDT Long (-400 USDT) position has a larger loss and is selected as the primary target for liquidation.
  3. Partial Liquidation Simulation: The engine simulates closing the BTCUSDT Long position.
    1. Remaining Equity: 400 USDT (assuming no additional trading fees for simplicity)
    2. Remaining Maintenance Margin: 500 USDT (Only ETH Short remains)
    3. New Margin Ratio: 500 / 400 = 125% (1.25) The ratio is still higher than the 80% (0.8) target!
  4. Further Liquidation: Since the 80% recovery target was not met, the engine proceeds to target the next position (ETHUSDT Short). Ultimately, both positions will be closed at market price to secure the account.