Liquidation 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 purchase an asset.
If the value of that asset (aka your position) falls, your losses begin to approach the value of your margin (ie. your initial collateral). This puts the exchange at risk—a sudden price movement could make your position worth less than your collateral. If the value of your asset is dangerously close to the value of your collateral, the exchange will proactively liquidate your position in order to secure against losses.
For example, if you open a 10x leveraged position using 100 USDC, your total initial position is worth 1,000 USDC—900 USDC of that position's value is borrowed.
Therefore, the exchange enforces a minimum ratio between the position's value and the margin, called a maintenance margin. On Perpetual Protocol, the maintenance margin is 6.25%.
In our previous example, if your position's value drops to 937.5 USDC, it will be liquidated. From this example, it is clear that 10x leverage is very high risk.
To make trading safer and more fair, Perpetual Protocol uses partial liquidations.
As long as your ratio between the asset value and the margin is above 2.5%, only 25% of your position will be liquidated.
As a simple example, if you have a position worth 1000 USDC with 2x leverage, your margin will be 500 USDC. Let's say the position's value drops to 660 USDC—this puts the ratio of
Liquidation occurs when your position margin ratio falls to 6.25% or below. This is known as the maintenance margin.
Perpetual Protocol uses a partial liquidation scheme.
Assuming a timely liquidation occurs, 25% of the position’s PnL will be realized and a corresponding portion of the position notional and margin will be liquidated, leaving the remaining position untouched.
⚠️ If the price moves fast than liquidation can occur and margin ratio falls to 2.5% or less, total liquidation will occur.
Definitionsmargin ratio: (margin + unrealized PnL) / positionNotionalliquidation penalty: 2.5% of positionNotional//1.25% to keeper; 1.25% to insurance fundInitial conditionspositionNotional = 1000leverage = 2xmargin = 500PnL = -440margin ratio: (500 - 440)/ 1000 = 0.06Post-liquidationassume positionNotional liquidated = 300 //actual amount will depend on x*y=k curveliquidation penalty: 300*0.025 = 7.5margin: 500 - (440*0.25) - 7.5 = 382.5margin ratio: (382.5 - 440*0.75) / (1000 - 300) = 0.075
Liquidation is triggered by keeper bots. As a reward for performing this service, keepers earn 1.25% of the remaining position notional.