Perpetual Futures
Liquidation
Liquidation
Liquidation Condition
Once this condition is triggered, the position is ready to be liquidated.
Liquidation⟺⎩⎨⎧collateral_size+PNLlong−borrow_fee−close_fee≤max_levsize,collateral_size+PNLshort−borrow_fee−close_fee≤max_levsize,perp long,perp short.
Where:
PNL=⎩⎨⎧S0size(S1−S0),S0size(S0−S1),perp long,perp short.
Borrow fee is accumulated hourly:
borrow_fee=⎩⎨⎧sizeh=1∑HrTOKEN-variable,sizeh=1∑HrUSDC-variable,perp long,perp short.
Liquidation Price
Pliq=⎩⎨⎧price−sizecollateral_size−close_fee−borrow_fee−max_levsizeprice,price+sizecollateral_size−close_fee−borrow_fee−max_levsizeprice,perp long,perp short.
In this case price is the oracle price of the token.