Baker Finance


Everything you need to know about liquidadation risks.

What is liquidation?

Opening a leveraged farming position comes with great opportunities, but also with some risks. One of these risks is the one of liquidation.
When the users borrow up funds they to open a position, the protocol needs to make sure they'll be able to pay back that loan. So the amount they add from their funds acts as collateral.
To ensure the users are able to pay for the loan, this collateral needs to remain above the amount they owe, plus a safety margin. If this condition is not met, the protocol can close their position to pay back lenders, and this is known as liquidation.

What is the risk of liquidation?

At first, when the user opens a position, typically there is no risk of liquidation. The risk is given by the fact that the deposit is in crypto tokens, so the value of the collateral and the debt are volatile, thus creating the risk of unbalancing the Debt/Collateral ratio, and exposing the position to liquidation.
When a user position is closed, 5% of the remaining position value is paid to the liquidator bot as a reward for closing your position and ensuring lenders were paid back.

When does liquidation occur?

Liquidation occurs when the Debt ratio exceeds the liquidation threshold.
  • Debt Value: the amount the user borrowed from lenders
  • Position Value: Collateral + Debt Value + Yields
  • Debt Ratio: Debt Value / Position Value
The liquidation threshold depends on the farm and the assets of the farming, at the bottom there's a detail of each farm.

Example and calculations

Let's make a liquidation example:
  1. 1.
    Bob opens an BNB-BUSD position using 2x leverage.
  2. 2.
    The liquidation threshold for this farm is 80%.
  3. 3.
    He supplies 2 BNB of his assets (worth 200 USDC).
  4. 4.
    He borrows 200 USDC (combined with 200 USDC supplied makes a 2x leveraged)
  5. 5.
    The protocol converts everything into a 50:50 proportion to create the LPs, in this case, it remains 2 AVAX + 200 USDC.
  6. 6.
    Bob's Debt ratio is 50% (Debt 200 USDC / Position Value 400 USDC)
  7. 7.
    If at some point BNB-USDC drops >62.5%, the debt ratio will exceed 80% (Debt Value 200 USDC / New Position value 250), exposing the position to a liquidation. A liquidator bot would then call the smart contract to close his position, repay the loan to the lenders, and return the remaining assets to his wallet.

Liquidation Thresholds

Liquidation Thresholds