Auto Deleveraging
ADL is a last-resort feature that is activated only if the insurance fund’s equity falls to zero (its bankruptcy price) and the liquidator therefore cannot cover the deficit.
Trigger – When a liquidation would leave the insurance fund insolvent, ADL begins.
Order-book sweep – All open orders on the insurance-fund account are first cancelled.
Counterparty ranking – Accounts holding opposite positions are ranked in strict priority:
Highest effective leverage
Highest unrealised PnL
Lowest account balance
Newest account (higher account number)
Forced position closure – Starting from the top of the list, the engine closes just enough of each profitable position against the insurance fund at the current oracle mark (capped at the bankruptcy price) to offset the shortfall.
No intermediate checks – Once ADL starts it runs to completion even if the fund would briefly become solvent part-way through. When the insurance fund’s equity is ≥ 0 and it holds no positions, ADL stops.
Example – ETH long unwound via ADL
Trader A is long 10 ETH from $4000.
ETH crashes to $3600. A’s equity is now –$2000.
The insurance fund has already reached its bankruptcy price, so it cannot absorb the loss – ADL triggers.
The system ranks profitable shorts; Trader B is first on the list.
The engine closes enough of B’s short at $3600 to transfer $2000 of PnL.
Result: Trader A’s position is fully closed, Trader B’s short is partially reduced, the insurance fund carries zero bad debt, and trading continues.
Last updated