Sub topic 9
What Happens at Liquidation: Forced Closing, Fees and the Insurance Fund
This chapter assumes you understand long and short positions, leverage, initial margin, maintenance margin, and approximate liquidation prices. Exchange rules differ, so treat the numbers below as a simplified model rather than a trading instruction.
Why liquidation starts
A leveraged position uses deposited collateral to support a larger position. As the position loses value, the trader's equity falls. Equity is the collateral plus unrealized profit or loss.
An exchange allows the position to remain open only while its equity stays above the required maintenance margin. If equity reaches that threshold, the liquidation engine takes control. The trader usually cannot cancel the process by adding collateral after execution has started.
For a long position, a falling price causes losses. For a short position, a rising price causes losses.
flowchart TD
A[Market price moves against position] --> B[Equity falls]
B --> C{Below maintenance requirement?}
C -->|No| D[Position remains open]
C -->|Yes| E[Liquidation engine takes control]
E --> F[Position is force-closed]
F --> G{Execution result}
G -->|Above bankruptcy price| H[Remaining value and fees are settled]
G -->|Below bankruptcy price| I[Insurance fund covers shortfall]The liquidation sequence
A typical centralized exchange process has these stages:
- The exchange calculates the position's risk using its mark price and account or position data.
- The maintenance requirement is breached.
- The exchange cancels some or all open orders that use the same collateral.
- The liquidation engine submits orders to reduce or close the position.
- The exchange charges a liquidation fee or closes the position at a special fee rate.
- Any remaining margin is returned according to the exchange's rules.
- If closing the position creates a deficit, the insurance fund may cover it.
The exchange may close the entire position at once, or reduce it in steps. Large positions can also be moved into a special liquidation account or auction process.
| Term | Meaning during liquidation |
|---|---|
| Maintenance margin | Minimum equity required to keep a position open |
| Bankruptcy price | Price where the position's remaining margin is exhausted |
| Liquidation price | Approximate trigger price based on exchange rules |
| Insurance fund | Reserve used to cover eligible liquidation deficits |
A numerical walkthrough
Suppose a trader opens a $10,000 long position with $1,000 of initial margin. This is 10x leverage. If the maintenance rate is 0.5%, the maintenance requirement is roughly based on the position's current notional value.
Ignoring fees and funding, the simplified long liquidation price is:
def liquidation_price(entry, leverage, maintenance_rate, side):
initial_margin_rate = 1 / leverage
if side == "long":
return entry * (1 - initial_margin_rate) / (1 - maintenance_rate)
if side == "short":
return entry * (1 + initial_margin_rate) / (1 + maintenance_rate)
raise ValueError("side must be 'long' or 'short'")
print(round(liquidation_price(100_000, 10, 0.005, "long"), 2))
# 90452.26The result is about $90,452, a decline of about 9.55% from entry. In a real account, trading fees, funding payments, position size tiers, mark-price rules, and other liabilities can move this level.
A liquidation fee reduces the margin available to absorb losses. Therefore, the displayed liquidation price is not a guaranteed execution price. Fast markets can produce slippage, which means the closing order fills at worse prices than expected.
The insurance fund
The insurance fund is a reserve financed by sources such as liquidation fees, trading fees, or direct exchange contributions. Its purpose is to prevent profitable counterparties from losing money when a liquidated position closes below its bankruptcy price.
For example, if a position's bankruptcy value is $20,000 but forced execution returns only $19,700, the $300 difference may be paid from the insurance fund. The exact priority and eligibility rules depend on the platform.
If the fund cannot cover losses, the exchange may use auto-deleveraging. It reduces profitable opposing positions, usually ranking traders by profit and leverage. This protects the system but can close a profitable trade without the trader choosing to exit.
Exercise
Why can a liquidation create a loss for the exchange even though the trader deposited margin?
Show answer
Rapid price movement and execution slippage can close the position below its bankruptcy price. The insurance fund may cover that deficit.