Olive Docs
Expiry Futures

Liquidation

Liquidation

Liquidation Condition

Once this condition is triggered, the position is ready to be liquidated.

Liquidation    {collateral_size+PNLlongclose_fee    sizemax_lev,Expiry Long,collateral_size+PNLshortclose_fee    sizemax_lev,Expiry Short.\text{Liquidation} \iff \begin{cases} \text{collateral\_size}+\text{PNL}_{\text{long}}-\text{close\_fee}\;\le\;\dfrac{\text{size}}{\text{max\_lev}}, & \text{Expiry Long},\\ \text{collateral\_size}+\text{PNL}_{\text{short}}-\text{close\_fee}\;\le\;\dfrac{\text{size}}{\text{max\_lev}}, & \text{Expiry Short}. \end{cases}

Where:

PNL={sizeF(S0,r,T0)(F(S1,r,T1)F(S0,r,T0)),Expiry Long,sizeF(S0,r,T0)(F(S0,r,T0)F(S1,r,T1)),Expiry Short.\mathrm{PNL}= \begin{cases} \dfrac{\text{size}}{F(S_0,r,T_0)}\Bigl(F(S_1,r,T_1)-F(S_0,r,T_0)\Bigr), & \text{Expiry Long},\\ \dfrac{\text{size}}{F(S_0,r,T_0)}\Bigl(F(S_0,r,T_0)-F(S_1,r,T_1)\Bigr), & \text{Expiry Short}. \end{cases}
  • S_1 is the current oracle price
  • S_0 is the oracle price at entry
  • T_1 is the current time
  • T_0 is the time at entry

Liquidation Price

Pliq={priceer(t0t1)collateral_sizeclose_feesizemax_lev  priceer(t0t1)size,Expiry Long,priceer(t0t1)+collateral_sizeclose_feesizemax_lev  priceer(t0t1)size,Expiry Short.P_{\text{liq}}= \begin{cases} \text{price}\,e^{r(t_0-t_1)}-\dfrac{\left|\text{collateral\_size}-\text{close\_fee}-\dfrac{\text{size}}{\text{max\_lev}}\right|\;\text{price}\,e^{r(t_0-t_1)}}{\text{size}}, & \text{Expiry Long},\\ \text{price}\,e^{r(t_0-t_1)}+\dfrac{\left|\text{collateral\_size}-\text{close\_fee}-\dfrac{\text{size}}{\text{max\_lev}}\right|\;\text{price}\,e^{r(t_0-t_1)}}{\text{size}}, & \text{Expiry Short}. \end{cases}

Where:

  • price is the oracle price
  • t_0 is the time position was opened
  • t_1 is the current time
  • r is the interest rate
r={rTOKEN-fixed,Expiry Long,rUSDC-fixed,Expiry Short.r= \begin{cases} r_{\text{TOKEN-fixed}}, & \text{Expiry Long},\\ -r_{\text{USDC-fixed}}, & \text{Expiry Short}. \end{cases}

On this page