Protocol
Liquidation
When a positions's value summed with the deposited collateral falls below the maintenance margin, the position is liquidated. This is done to ensure the protocol's solvency and to protect the AMM from being undercollateralized.
Liquidations are executed automatically by the protocol.
Liquidation causes loss of funds
After liquidation, users are not returned any collateral remaining after the position is closed. Liquidation results in the loss of all funds deposited as collateral for the position being liquidated.
Liquidation price
Position PnL during liquidation checks is calculated using a special worst-case liquidation price:
For shorts:
P_liq = max(P_ask, P_mark)
For longs:
P_liq = min(P_bid, P_mark)
Liquidation process
- The protocol monitors the account value of all users in real-time.
- When it's detected that a position is failing the maintenance margin requirement, the protocol will automatically close it against the respective AMM.
- If the position is in positive equity, a 15 bps platform fee will be charged on the transaction.
- The entire collateral will be deposited to AMM liquidity and the position size will be reduced to 0.