1. Liquidation Overview
Liquidation occurs when the margin balance falls below the maintenance margin requirement.
Margin Balance refers to the total value of the trader’s wallet balance plus unrealized PnL (profit and loss).
Maintenance Margin is the minimum amount of margin that must be maintained in order to keep an open contract position and avoid liquidation.
When the margin balance drops below the maintenance margin requirement, the system will automatically initiate forced liquidation of the position.
2. Liquidation Price and Bankruptcy Price
The difference between the liquidation price and the bankruptcy price represents the maintenance margin buffer.
Liquidation Price
The liquidation price refers to the price at which a position triggers forced liquidation. This threshold is influenced by multiple factors, including the leverage used, maintenance margin ratio, current cryptocurrency price, and the trader’s account balance.Bankruptcy Price
The bankruptcy price refers to the price at which the trader’s losses equal the value of the deposited collateral or initial margin. Starting from this price, the margin balance of the liquidated user will be reduced to zero.
As shown in the figure above, a position has both a bankruptcy price and a liquidation price. The difference between them represents MM (the maintenance margin buffer).
When the market price moves beyond the liquidation price, the user loses control of the position. At this point, the system will initiate the liquidation process and take over the user’s position. The system will then proceed with the internal liquidation procedure.
III. Liquidation Process
The liquidation process consists of two steps: liquidation order execution and ADL.
(In either step, once liquidation is triggered, the user has already lost the value of the position. In other words, once liquidation occurs, the user will lose the entire position margin (Position IM).)
Liquidation Order Execution
After the system takes over the user’s position, it will place an order at the bankruptcy price in the market to liquidate the position. If the order is filled at a price better than the market price, the remaining funds will be transferred to the insurance fund. For the user, this portion is referred to as the liquidation fee.
ADL (Auto-Deleveraging)
When the system places an order at the bankruptcy price to liquidate the position, it may not be filled due to rapidly deteriorating market conditions. If the order remains unfilled for more than 9 seconds, it will then be executed with a quantitative account at the bankruptcy price.
IV. Example
Liquidation Order Execution
Using isolated margin with 5× leverage, a trader opens a long ETCUSDT position.
The entry price is 22, and the position size is 10 ETC, forming an open position as shown in the figure below.
Liquidation Price Formula
For a USDT-margined long position, the liquidation price is rounded up to the next price unit after moving one step forward based on the price unit.
For ETC, the price unit (ETC PriceUnit) is 2.
Formula:
pv − (im + ab) + mm + takerFee (fee calculated based on the liquidation price) = resValue
After derivation:
liq_price = (pv − (im + ab) + mm) / (hv × cs × (1 − takerRate))
Where:
pv = Position value
im = Initial margin
ab = Account balance allocated to the position
mm = Maintenance margin
hv = Holding value
cs = Contract size
takerRate = Taker fee rate
Calculation using the formula:
The calculated result is consistent with the current position data.
When the mark price moves below 17.71, liquidation will be triggered. At that point, the system will take over the user’s position and place a sell order at 17.6.
Based on the current order book depth, it can be observed that the order will match with a buy order at 21. Therefore, the execution price of the liquidation order will be 21.
Distribution of Fund Flow:
For the entire position, the entry price is 22 and the exit price is 21.
Realized PnL = (22 − 21) × 10 = 10 loss
Closing Fee = 21 × 10 × 0.0006 = 0.126
Liquidation Clearance Fee = positionIM − Realized PnL − Closing Fee
= 44.132 − 10 − 0.126 = 34.006
Trade Record
Realized PnL = −(22 − 21) × 10 = −10 (loss)
Fee = 21 × 10 × 0.0006 = 0.126
Position History
Total Fees = Opening Fee + Closing Fee
Opening Fee = 22 × 10 × 0.0006 = 0.132
Closing Fee = 21 × 10 × 0.0006 = 0.126Total Fees = 0.132 + 0.126 = 0.258
Liquidation Clearance Fee: 34.006 (as calculated above)
Realized PnL: 10 loss (as calculated above)
Order HistoryOrder Type: Liquidation Order
Realized PnL: 10 loss
Liquidation Clearance Fee: 34.006
Closing Fee: 0.126 (Taker role)
ADLUsing isolated margin with 5× leverage, a trader opens a short position, forming an open position with an entry price of 21 and a position size of 10 ETC, as shown in the figure below.
For a USDT-margined short position, the liquidation price is rounded down to the next price unit after moving one step forward based on the price unit.Formula:
PV + (IM + ab − MM − takerFee (fee calculated based on the liquidation price)) = resValue
After derivation:
liq_price = (PV + IM + ab − MM) / ((1 + takerRate) × hv × cs)
Calculation using the formula:
The calculated result is consistent with the current position data.
When the mark price moves beyond 25.09, liquidation will be triggered. At this point, the system will take over the user’s position and place an order at 25.2 to liquidate the position.
Based on the current order book depth, there are no matching orders in the market, so the order cannot be filled through the order book. As a result, it will ultimately be executed with a quantitative account at the price of 25.2, forming an ADL (Auto-Deleveraging) order.
When the liquidation process begins, the order is first placed at 25.2. If no market orders match it, the system cancels the order and proceeds with the ADL process.
Distribution of Fund FlowFor the entire position, the entry price is 21 and the exit price is 25.2.
Realized PnL = (25.2 − 21) × 10 = 42 loss
Closing Fee = 25.2 × 10 × 0.0006 = 0.1512
Liquidation Clearance Fee
= positionIM − Realized PnL − Closing Fee
= 42.1512 − 42 − 0.1512 = 0The entire margin is exactly depleted, therefore no liquidation clearance fee is generated.
Trade HistoryClose PnL = (25.2 − 21) × 10 = 42 loss
Closing Fee = 25.2 × 10 × 0.0006 = 0.1512
Position HistoryClose PnL = (25.2 − 21) × 10 = 42 loss
Opening Fee = 21 × 10 × 0.0006 = 0.126
Closing Fee = 25.2 × 10 × 0.0006 = 0.1512
Total Fees = 0.126 + 0.1512 = 0.2772
Order HistoryOrder Type: ADL Order
Realized PnL: 42 loss
Liquidation Clearance Fee: 0
Closing Fee: 0.1512 (Taker role)
*The above liquidation rules apply to both futures trading and copy trading.