Liquidations

Basics

Loan-To-Value

LTV=(Loan AmountTotal Collateral Value)×100 \text{LTV} = \left( \frac{\text{Loan Amount}}{\text{Total Collateral Value}} \right) \times 100

When a position's loan-to-value ratio (LTV) exceeds a certain threshold (Liquidation Threshold), Liquidation occurs. This triggers liquidation bots to close the position to ensure debt repayment, which means your borrowed funds will be returned to the lender, and any potential remaining portion(after deductions of liquidation bounty) will be returned.

Health Factor

The health factor in XLend is an important indicator that shows how secure a borrowing position is. It calculates the ratio between the collateral value (adjusted by the liquidation threshold) and the total borrowed amount. Mathematically:

Health Factor=Total Collateral Value×Weighted Average Liquidation ThresholdTotal Borrow Value\text{Health Factor} = \frac{\text{Total Collateral Value} \times \text{Weighted Average Liquidation Threshold}}{\text{Total Borrow Value}}
  • If the health factor is above 1, the borrowing position is considered safe, as it’s above the liquidation threshold.

  • If the health factor drops below 1, the position risks liquidation.

  • To improve it, users can increase collateral or reduce the borrowing amount.

The health factor is dynamic—it changes based on fluctuations in both collateral and debt values. As the collateral’s market value rises, the health factor improves, lowering liquidation risk. Conversely, if the collateral value drops, the health factor decreases, raising the risk of liquidation.

Liquidation Model

XLend utilizes the Liquidation Mechanism 2.0 in Extrafi’s Leveraged Yield Farming (LYF), which has been successfully maintaining the safety of the lending pool since mid-2023.

  • When the Liquidation Threshold is reached, only a portion (50% as default) of the user's position will be subject to liquidation. During the liquidation process, a liquidation fee is also levied against the borrower's collateral.

    (If the Health Factor fell below 0.95, the whole position could be liquidated.)

  • If liquidation continues due to ongoing price movements, users may eventually retain assets on the platform, free from debt. These assets represent the remaining portion of the position post-liquidation, and they can be withdrawn at any time.

  • Liquidations are permissionless on XLend, meaning anyone can initiate the process if a position qualifies.

⚠️ Important: Please note that in the event of a significant price movement, there is a possibility that no remaining assets are left. This can occur when the equity approaches the value of the debt or falls below the value of the debt, leading to a complete loss of assets.

  • Please refer to [link] for detailed risk parameters of each listed asset.

  • Please refer to [link] for liquidation fees.

Liquidation Execution

Liquidation on XLend is permissionless. You can refer to the open-source codebase to learn how to liquidate positions with a health factor below 1.

Liquidation can be competitive, it's recommended that you develop your high-efficiency liquidation bot or strategy. This will not only improve your chances of successful liquidations but also contribute to maintaining the protocol’s overall health.

Last updated