Crypto Liquidation Engines: How They Work
On a leveraged venue, the risk engine stands between a volatile market and insolvency — how liquidation, insurance funds, and ADL work, sourced.
Offering leverage means offering the possibility of losses larger than a trader's margin. The risk engine is the set of systems that make sure those losses never fall on the exchange — or on other traders. On a derivatives venue, it's as important as the matching engine, and far less forgiving of mistakes.
The three lines of defense
A solvent leveraged venue relies on a layered system:
1. Maintenance margin & liquidation
Every position has a maintenance margin — the minimum equity required to keep it open. When the mark price moves enough that equity falls below it, the position is liquidated: force-closed to stop further loss. The liquidation price is a function of entry, leverage, and the maintenance-margin rate (Bybit: liquidation, Bybit: maintenance margin). We break the math down in How Liquidation Price Is Calculated.
2. The insurance fund
Sometimes a position can't be closed at a price better than its bankruptcy price — the market gapped. The insurance fund absorbs that shortfall. It's a reserve pool funded by the venue plus the excess margin from liquidations that were closed better than bankruptcy price (Bybit: ADL & insurance fund). In normal conditions it quietly covers the gaps.
3. Auto-deleveraging (ADL)
In extreme conditions, if the insurance fund can't cover the losses, the last resort is auto-deleveraging: the engine nets a liquidated position against an opposing, profitable position and closes part of it at the bankruptcy price. Traders are ranked for ADL by leveraged return — the most aggressive, highest-leverage winners are tapped first (Bybit: ADL).
See liquidation in action
The threshold a position can survive shrinks fast with leverage — the reason the risk engine has to act quickly and precisely:
Simplified isolated-margin estimate. Excludes fees and funding. See the formula and source below.
Why operators don't build this themselves
A risk engine has to monitor mark prices in real time, calculate thresholds continuously, liquidate cleanly without cascading, and stay solvent through the worst volatility on record. Getting it almost right isn't good enough — an under-provisioned risk engine is how venues accumulate bad debt and fail. It's one of the strongest arguments for launching on proven infrastructure rather than building from scratch.
The takeaway
The risk engine keeps a leveraged venue solvent through a cascade: liquidation, then insurance fund, then auto-deleveraging. It's safety-critical systems work — the part of an exchange where "move fast and break things" is the wrong philosophy.
Mechanisms and parameters vary by exchange; figures reflect the cited documentation.
GammaFloww Team
Derivatives exchange infrastructure engineers
The GammaFloww team builds white-label crypto derivatives exchange infrastructure — matching engines, liquidity, and risk systems — used by partners to launch futures and options venues. These guides distill what we've learned shipping and operating that stack.
More in Operator Playbook
Crypto Exchange Go-to-Market Playbook
Launching the tech is the easy part — filling the order books with real traders is the challenge. A go-to-market playbook for a new venue.
Proof of Reserves: What It Proves (and What It Misses)
Proof of reserves is now table stakes for exchanges. How Merkle-tree PoR works, how zk-proofs improve it, and the limits every operator should know.
Crypto Launchpad Development for Your Exchange
A crypto launchpad lets your exchange host token sales (IEOs). What launchpad development involves, why exchanges add one, and the risks to manage.
Crypto Exchange Security: The Operator's Checklist
Crypto exchange security is layered defense of funds and data: cold storage, 2FA, whitelists, audits, proof of reserves — the operator checklist.
Thinking about launching your own venue?
GammaFloww is the white-label engine behind modern derivatives exchanges. See how fast you could go live.
