> ## Documentation Index
> Fetch the complete documentation index at: https://docs.berachain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Liquidation

> When positions are liquidated, health factor and LLTV, liquidation process, and liquidator incentives.

Liquidation protects lenders by closing undercollateralized positions and keeping markets solvent. If you're integrating borrowing, you need to explain when and how liquidation works.

When your position becomes too risky, a **liquidator** can repay your debt and seize your collateral at a discount.

## When liquidation occurs

A position can be liquidated when its **health factor is 1 or below**—that is, when LTV meets or exceeds the market's **LLTV** (Liquidation Loan-to-Value).

**Debt value / Collateral value ≥ LLTV** → position is liquidatable.

Common causes:

* Collateral price falls
* Debt grows from accrued interest

## Liquidation process

Bend liquidations are not auctions. The first liquidator to act repays debt and receives collateral at a discount in one transaction.

1. **Unhealthy position**: A liquidator (often a bot) finds a position with health factor ≤ 1.
2. **Repay debt**: The liquidator calls `liquidate` on the Bend contract and repays some or all of the debt in the loan asset.
3. **Seize collateral**: The liquidator receives collateral worth the repaid amount times the **Liquidation Incentive Factor (LIF)**.
4. **Position updated**: The borrower's debt and collateral are reduced accordingly.

### Liquidation Incentive Factor (LIF)

The **LIF** is the bonus a liquidator earns. It is derived from the market's LLTV; higher LLTV means a smaller bonus to limit cascades.

For **LLTV 86%**, **LIF ≈ 1.05** (about a **5%** bonus on seized collateral). The full incentive goes to the liquidator; Bend does not take a fee.

Formula:

$$
\mathrm{LIF} = \min \left( \mathrm{maxLIF},\ \frac{1}{(1 - \beta) \times (1 - \mathrm{LLTV})} \right)
$$

* **LLTV**: Market liquidation threshold (e.g. 0.86)
* **β** = 0.3 (constant)
* **maxLIF** = 1.15 (15% cap)

### Example (LLTV 86%)

* **Before**: Debt **\$87,000**, collateral **\$100,000** → LTV 87% > 86% → liquidatable.
* **Liquidator** repays **\$87,000** and receives **\$87,000 × 1.05 = \$91,350** of collateral.
* **Borrower**: Debt cleared; **\$4,350** loss (collateral drop).
* **Liquidator**: **\$4,350** profit (minus gas).

### Bad debt

If collateral value falls below the debt (LTV > 100%), a liquidation may not cover the full loan. The shortfall is **bad debt** and is a loss to lenders in that market. Isolated markets and conservative LLTVs are designed to make this rare.
