Sub topic 13
Liquidation
Assume you understand basic crypto markets, percentages, exchange accounts, and simple Python. This chapter focuses on leveraged derivatives, where a trader controls a position larger than the collateral deposited.
What liquidation means
Liquidation is the forced closing of a leveraged position when the account no longer has enough margin to support the exchange’s maintenance margin requirement. Maintenance margin is the minimum collateral required to keep a position open.
A long position loses money when its contract price falls. A short position loses money when the price rises. As unrealized profit and loss changes, the trader’s remaining margin changes too.
The liquidation process usually works like this:
- The exchange calculates unrealized profit or loss.
- It compares the account’s remaining equity with the maintenance margin.
- If equity reaches the maintenance requirement, the exchange begins closing the position.
- The exchange uses the liquidation price, mark price, and available risk controls to manage the close.
Liquidation is usually triggered by the mark price, not the last traded price. This reduces the chance that one abnormal trade causes an immediate liquidation.
Estimating the liquidation price
For an isolated-margin linear contract, ignoring fees and funding, a simplified estimate is:
For a long:
\[ PL = PE \frac{1 - 1/L}{1 - m} \]
For a short:
\[ PL = PE \frac{1 + 1/L}{1 + m} \]
Here, \(P_E\) is the entry price, \(L\) is leverage, and \(m\) is the maintenance margin rate.
def liquidation_price(entry, leverage, maintenance_margin_rate, side):
"""Isolated-margin linear contract, ignoring fees and funding."""
if side == "long":
return entry * (1 - 1 / leverage) / (1 - maintenance_margin_rate)
return entry * (1 + 1 / leverage) / (1 + maintenance_margin_rate)
print(liquidation_price(60000, 10, 0.005, "long"))
print(liquidation_price(60000, 10, 0.005, "short"))With a $60,000 entry, 10× leverage, and a 0.5% maintenance rate, the estimated long liquidation price is about $54,271. The estimated short liquidation price is about $65,372.
Higher leverage places the liquidation price closer to the entry price. At 10× leverage, a relatively small adverse move can consume most of the initial margin. At 2× leverage, the position has more room to absorb losses.
> callout note > This formula is only an estimate. Real exchanges may include trading fees, funding payments, tiered maintenance rates, position size, insurance-fund rules, and different liquidation fees. Always use the venue’s published contract specification and liquidation calculator.
Isolated and cross margin
Isolated margin limits the collateral assigned to one position. A liquidation normally affects that position without consuming the entire derivatives balance.
Cross margin allows positions to share account equity. This can delay liquidation when other positions have available profit or collateral. However, a large loss can consume the wider account balance and put multiple positions at risk.
Liquidation is separate from ordinary position closing. A trader chooses to close a position. Liquidation happens because the exchange’s risk system closes it automatically.
Exercise
Why does a 10× position usually liquidate after a smaller adverse price move than a 2× position?
Show answer
The 10× position uses less initial margin relative to its notional value, so a smaller loss consumes the available margin and reaches the maintenance requirement sooner.