BitMEX employs an Auto-Deleveraging (ADL) system as a margining method for its speculative derivative instruments as an evolution to the “Socialised Loss” system.
Socialised Loss systems have a few disadvantages:
The ADL system aims to resolve loss uncertainty, allowing traders to make decisions as soon as the deleveraging event occurs, rather than wait for rebalance or settlement. Traders who become deleveraged will be immediately informed of their closeout price and size. They may then choose to re-enter the market.
Let’s assume within the system there are 6 longs and their effective leveraged PnL score has been calculated. Note the higher the PnL Ranking, the higher their effective leveraged PnL.
The system will next rank these positions from the highest score to the lowest and calculate the quintile associated in that position.
In the case of a liquidation, those users in the top percentiles will be deleveraged first. Let’s consider a short position that has been liquidated with size 20 and bankruptcy price of USD 650.
Accounts 2 and 5 will be deleveraged at the bankruptcy price of USD 650. Account 2 will have their entire position of 10 contracts closed, while the remaining 10 contracts from the short liquidation will be assigned to account 5.
Account 5 will thus have 10 contracts remaining (from 20). Depending on his/her effective leverage, account 5 may or may not remain in the lowest quintile.
Both users will be notified and given the opportunity to re-enter their positions.
For an example of how this process looks via the API, please see the WebSocket Documentation