Since leveraged trading involves under-collateralization, the system must ensure that no trader's loss exceeds the margin posted to the position. Whenever the margin posted is not enough for the Margin Ratio MR to be above Maintenance Margin Ratio MMR, the position will become eligible for liquidation by liquidation workers. The liquidation worker code will be open-source so everyone can become a liquidator on Bluefin. The liquidation price is displayed in the positions tab. It is recommended to add margin or lower the leverage to prevent liquidation.
Liquidation Price: the price at which the MR equals the MMR,
Liquidation Price={Position DebtSize×(1MMR)if Long, Position DebtSize×(1+MMR)if Short.\text{Liquidation Price} = \begin{cases} \frac{\text{Position Debt}}{\text{Size}\times(1-\text{MMR})} \quad &\text{if Long}, \\\ \frac{\text{Position Debt}}{\text{Size}\times(1+\text{MMR})} \quad &\text{if Short}.\end{cases}
Bankruptcy Price: the price at which the MR becomes zero and the unrealized loss equals position margin. Bankruptcy price can be calculated using the Liquidation Price formula with the MMR set to 0. If a user is liquidated beyond the Bankruptcy Price, the exchange incurs a capital drawdown, compensated for by the insurance fund.
Bankruptcy Price=Position DebtSize\text{Bankruptcy Price}= \frac{\text{Position Debt}}{\text{Size}}
All positive-value liquidations partly capitalize the Insurance Fund.