Liquidations
Liquidations are a vital component of leveraged trading. Leverage trading is a type of trading strategy where a trader borrows funds from an exchange to increase their buying power and potentially amplify their returns. In leverage trading, the borrowed funds are used to open larger positions than would be possible with the trader's own capital. For example, let's say a trader has $1,000 in capital and wants to trade Bitcoin with a leverage ratio of 10:1. With leverage trading, the trader could borrow an additional $9,000 from an exchange, bringing their total buying power to $10,000. This would allow them to open a position in Bitcoin that is 10 times larger than what they could do with their capital alone.
While leverage trading can potentially lead to greater profits, it also comes with higher risks.
In case the market moves against the trader's position, Sujiko triggers a liquidation against said position. This is because the borrowed funds must be paid back to the exchange, regardless of the outcome of the trade. In this way, the interests of the exchange can be upheld at all times.
How Do Liquidations Work?
Liquidation Trigger
Each perpetual futures market on Sujiko is configured with an initial maintenance margin and minimum maintenance margin.
A liquidation is triggered when the margin ratio of a trader's position goes below the minimum maintenance margin for a specific perpetual futures market.
Positions worth $1,000 or less will be fully liquidated. Larger positions will be partially liquidated 33% every 5 minutes (total position size will be closed within 15 minutes).
Liquidation Price
The liquidation price for a trader’s position is determined by the minimum maintenance margin and collateral posted.
Liq Price (Long) = AVG_OPEN_PRICE - ((MIN_MARGIN-2*MAX_FEE-MAX_FUNDING) / SIZE) capped to 0
Liq Price (Short) = AVG_OPEN_PRICE + ((MIN_MARGIN-2*MAX_FEE-MAX_FUNDING) / SIZE) not cappedExample
Let us assume we are trading MADLADS-PERP:
- initial margin ratio (IMR) of 100% (~1x leverage)
- minimum margin ratio (MMR) of 50% (~2x effective leverage)
- index (mark) price of 1 contract: $1,100
- oracle price of 1 contract: $1,100
We open a MADLADS-PERP long position for 1 contract ($1,100) with $1,100 collateral.
The liquidation price for this position be calculated as follows.
Position opened.
AVG_OPEN_PRICE = 1100
SIZE = 1
NOTIONAL = 1 * 1100
= 1100
MAX_FEE = 1.5% OF NOTIONAL
= 0.015 * 1100
= 16.5
MAX_FUNDING = 5% OF NOTIONAL
= 0.05 * 1000
= 60
MARGIN_POSTED = NOTIONAL * IMR
= 1100 * 1
= 1100
MIN_MARGIN = (NOTIONAL * MMR) + (2*MAX_FEE + MAX_FUNDING)
= (1100 * 0.5) + (2*16.5 + 60)
= 643
LIQ_PRICE = AVG_OPEN_PRICE - ((MIN_MARGIN - 2*(2*MAX_FEE + MAX_FUNDING)) / SIZE)
= 1100 - ((643 - 2*((2*16.5) + 60))/1)
= 643
Price moves 41.55% down to $643.
PNL = SIZE * ENTRY * PERCENT_CHANGE
= NOTIONAL * PERCENT_CHANGE
= 1 * 1100 * -0.4155
= -457.05
NET_MARGIN = 1100 - 457.05
= 642.95
Condition NET_MARGIN <= MIN_MARGIN met.
Position is liquidated.
Of $1100 collateral:
1) $642.95 goes to IF (Insurance Fund) pool
2) $457.05 goes to PNL pool.Auto-Deleveraging (ADL)
Auto-Deleveraging (ADL) occurs when a perpetual futures market is deemed unhealthy.
A market can be deemed unhealthy when the sum of the PNL pool and Insurance Fund cannot cover all bankrupt positions.
More profitable and higher leveraged traders will be liquidated first. Traders are ranked by their margin ratio and unrealised PNL as a percentage of their collateral.
If a user is deleveraged, all of the user’s open orders will be cancelled.
Example
Rank = PNL % * Effective Leverage (if PNL % > 0)
= PNL % / Effective Leverage (if PNL % < 0)
where
Effective Leverage = ABS(Mark Value) / (Mark Value - Bankrupt Value)
PNL percentage = (Mark Value - Avg Entry Value) / ABS(Avg Entry Value)
Mark Value = Position Value at Mark Price
Bankrupt Value = Position Value at Bankruptcy Price
Avg Entry Value = Position Value at Average Entry PriceLiquidators
Details to follow once the liquidator programme is stable and publicly available.