Market Cap: $2.8588T -5.21%
Volume(24h): $157.21B 50.24%
Fear & Greed Index:

28 - Fear

  • Market Cap: $2.8588T -5.21%
  • Volume(24h): $157.21B 50.24%
  • Fear & Greed Index:
  • Market Cap: $2.8588T -5.21%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How do exchanges' liquidation engines work?

Perpetual futures liquidations trigger when equity falls below the maintenance margin, using real-time mark price—not last traded price—to prevent manipulation and ensure fairness.

Dec 27, 2025 at 03:59 am

Liquidation Trigger Mechanisms

1. Each perpetual futures contract on centralized exchanges maintains a maintenance margin requirement, expressed as a percentage of the position’s notional value.

2. When a trader’s equity—defined as wallet balance plus unrealized PnL—falls below the required maintenance margin level, the system flags the position for liquidation.

3. Exchanges do not wait for the account equity to hit zero; instead, they initiate forced closure once the margin ratio dips beneath a predefined threshold, often ranging from 0.5% to 2.5%, depending on leverage and asset volatility.

4. The margin ratio is recalculated continuously using real-time mark price, not last traded price, to prevent manipulation during flash crashes or illiquid spikes.

5. Some platforms incorporate dynamic margin adjustments during extreme market stress, temporarily raising maintenance thresholds to reduce cascading liquidations.

Price Sources and Mark Price Calculation

1. Liquidation engines rely on a composite mark price derived from multiple spot exchange feeds, weighted by volume and latency-adjusted timestamps.

2. This mark price typically excludes outliers using median-based filtering or trimmed mean algorithms to resist short-term pump-and-dump distortions.

3. Funding rate differentials between perpetuals and underlying spot markets are factored into the mark price formula to anchor it closer to fair value.

4. Exchanges like Binance and Bybit publish their exact mark price methodology in public documentation, enabling third-party verification and bot integration.

5. During low-liquidity events, the mark price may widen significantly from the index price, triggering liquidations that would not occur under normal order book depth.

Execution and Order Routing Logic

1. Once triggered, the liquidation engine submits a market order to the internal matching engine at the best available price within the current top-of-book depth.

2. No partial fills are permitted—positions are closed entirely in one atomic transaction to avoid re-triggering margin checks mid-execution.

3. The engine prioritizes speed over price optimization: latency is measured in microseconds, and routing paths bypass standard API gateways in favor of direct FIX or binary protocol channels.

4. Liquidation orders are tagged with special flags to prevent them from appearing in public trade history or influencing candlestick data.

5. In cases where the order cannot be fully filled due to insufficient opposing liquidity, the remaining position is immediately canceled rather than left open.

Insurance Fund Interaction

1. After execution, realized loss is deducted from the trader’s wallet balance, and any shortfall is covered by the exchange’s insurance fund.

2. The insurance fund is replenished through a portion of trading fees and, in some cases, surplus from profitable liquidations where execution price exceeds bankruptcy price.

3. When liquidation occurs at a price worse than the bankruptcy price, the deficit is absorbed entirely by the insurance pool—not redistributed across other users.

4. Public dashboards display real-time insurance fund balances, updated after every liquidation event, allowing transparency into systemic risk exposure.

5. Certain platforms implement auto-deleveraging only when the insurance fund falls below a critical floor, targeting highly leveraged positions first.

Frequently Asked Questions

Q: Why does my position get liquidated even when the chart shows price didn’t reach my liquidation price? A: Charts display last traded price; liquidations use mark price, which integrates real-time spot indices and funding adjustments—often diverging during volatility.

Q: Can exchanges manipulate liquidations by adjusting the mark price formula? A: The mark price methodology is published and immutable per contract; changes require versioned updates with advance notice and no retroactive effect.

Q: What happens if the insurance fund runs out during a cascade? A: Auto-deleveraging activates, reducing positions of profitable counterparties starting from highest leverage, preserving solvency without user deposits at risk.

Q: Do liquidation orders appear in the public order book? A: No—they execute directly against the matching engine’s internal liquidity pool and are excluded from all public market data feeds.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct