Liquidation

Liquidation introduction

Clearing is a key part of leveraged trading. When you open a leveraged position, in a sense, you are using collateral to borrow money from the exchange to buy assets.

If the value of the asset (that is, your position) falls, your losses increase and begin to approach the value of the margin (that is, your initial collateral). This puts the exchange at risk-sudden price fluctuations may make your position value less than the value of your collateral. If the value of your assets is dangerously close to the value of the collateral, the exchange will actively liquidate your position to avoid losses.

For example, if you use 100 USDT to open a 10 times leveraged position, the total value of your initial position is 1,000 USDT-900 USDT of the position value is lent to the exchange by the trader.

Therefore, the exchange enforces the minimum ratio between the position value and the margin, which is called the maintenance margin ratio. In the perpetual agreement, the maintenance margin ratio is 6.25%.

In our example above, if the value of your position drops to 937.5 USDC, it will be liquidated. It can be clearly seen from this example that a leverage ratio of ten times has a very high risk.

Margin vs. Collateral in Perpetual Contract Trading

Collateral is funds that you can use for trading and are currently unused. Margin specifically refers to the collateral corresponding to the current open position.

Partial liquidation

In order to make transactions more secure and fair, the perpetual agreement uses a partial clearing mechanism.

As long as the ratio between your asset value and margin is higher than 2.5%, only 25% of your position will be liquidated.

To give a simple example, if the value of your position is 1000 USDT and the leverage is 2 times, your margin is 500 USDT. Suppose the value of the position drops to 660 USDC

The clearing mechanism of perpetual agreements

Liquidation occurs when your position margin ratio drops to 6.25% or lower. This is called the maintenance margin rate.

Perpetual agreements use partial liquidation schemes.

Assuming that the liquidation is timely, 25% of the PnL of the position will be settled, and the notional amount of the position and the corresponding part of the margin will be liquidated, while the remaining positions remain unchanged.

⚠️If the price moves faster than the liquidation occurs and the margin ratio drops to 2.5% or lower, the position will be fully liquidated.

For example

definition

Margin rate: (margin + unrealized profit and loss) / position after leverage

Liquidation reward: positions after 2.5% leverage

Of which 1.25% is allocated to the Keeper and 1.25% is allocated to the Insurance Fund

Initiation conditions

Position after leverage = 1000

Leverage = 2x

Margin=500

PnL=-440

Margin rate=(500-440)/1000=0.06

​Post-liquidation

Assuming that the position is liquidated after leverage = 300 (the specific number depends on the curve of x*y=K)

Liquidation reward: 300*0.025 = 7.5

Margin: 500-(440*0.25)-7.5 = 382.5

Margin rate: (382.5-440*0.75) / (1000-300) = 0.075

The liquidation will be triggered by Keeper bot. As a reward for executing this service, Keeper bot can get 1.25% of the value of the remaining nominal position

Keeper is used with blockchain because smart contracts and blockchains are usually passive, and code cannot be executed without an external trigger mechanism. Keeper bot is a decentralized solution that completes the triggering (anyone can run the bot).

Liquidation based on oracles under severe market volatility In order to cope with the risk of flash crashes, if the mark price differs from the index price (Oracle price) by more than 10%, it will be liquidated based on the Oracle price assessment. If the price of the perpetual agreement differs significantly from the spot price, this measure can provide additional protection to reduce the risk of traders being liquidated during a flash crash.

Last updated