When the balance of the risk reserve account is insufficient to cover the bankruptcy, profitable accounts will be forced to stop making profits, and these accounts will be matched with the bankruptcy accounts and make a deal to prevent the user's loss, this is how the Auto-Deleveraging (ADL) mechanism works.
The counterparty's position will be closed at the market price when the ADL occurs to ensure a successful transaction.
There are two queues for the ADL, one for long positions and the other for short positions. The queue is sorted and reduced according to the ADL indicators.
The queue factors include leverage and profit, so, the ADL indicator is introduced. The larger the ADL indicator, the more priority will be given to forced deleveraging in the event of counterparty forced liquidation.
The calculation formula is as follows:
Profitability: Index = Profit Percentage * Effective Leverage
Loss: Index = Profit Percentage / Effective Leverage
Effective Leverage = abs (Mark Value) / (Mark Value - Bankruptcy Value)
Profit percentage = (Mark Value - Average Entry Value) / abs (Average Entry Value)
Mark Value = Position Value at the Mark Price
Bankruptcy Value = Position Value at the Bankruptcy Price
Average Entry Value = Position Value at the Average Entry Price
When the ADL mechanism occurs, a liquidation notification will be sent to the user whose position is reduced. If the user has unfilled orders, these orders will be canceled. After the liquidation is completed, the user whose position has been reduced can reopen the position at any time.
The ADL mechanism may cause the counterparty to lose all their positions, that is, liquidation by the system. In this case, no liquidation fee will be charged for forced liquidation.