For one specific position to be liquidated (e.g., long in BTC perpetual), we execute the following actions:
Find all the accounts which hold short positions in BTC perpetual and calculate their corresponding leveraged P&L Ratios
Sort these accounts descendingly in the leveraged P&L ratio
Liquidate the position with the position from the FIRST account at the current MARK price
If the position can be fully liquidated, done
Else, repeat (3), i.e., starting from the next account
Note:
The ADL will always be conducted at the Mark Price
If ADL, there will be no trading fee charged to the counterparty. However, the liquidation fee will still be applicable to the account being liquidated.
For a position either in profit or in loss, the smaller the margin ratio (MB/MM), the larger the leveraged P&L Ratio. Positions with the largest leveraged P&L Ratio are prioritized for ADL first.
Under either portfolio margin or cross margin, the MB and MM refer to the portfolio level MB and MM, not position level.
Position Type | Gain/Loss | Leveraged P&L Ratio |
Long Position | In Profit | (Mark Price - Entry Price) / Entry Price / (MB/MM) |
Long Position | In Loss | (Mark Price - Entry Price) / Entry Price * (MB/MM) |
Short Position | In Profit | (Entry Price - Mark Price) / Entry Price / (MB/MM) |
Short Position | In Loss | (Entry Price - Mark Price) / Entry Price * (MB/MM) |