# Health & Liquidations

**Health of Borrower Positions**

Every pair is set with a Maximum Loan-To-Value (LTV) ratio. As interest compounds over time, borrowers may need to increase their collateral or reduce their loan amount to prevent their position from deteriorating. The LTV ratio is calculated using the collateral value and the value of the borrowed lTokens.

The LTV formula is as follows:&#x20;

$$\Huge LTV = \frac{\text{BorrowShares} \times \text{SharePrice}}{\text{CollateralBalance} / \text{ExchangeRate}}$$

Here, the Share Price refers to the value of one lToken in terms of Asset Token units, essentially the AssetToken:lToken ratio. The Exchange Rate denotes the value of one Asset Token in units of the collateral, or the Collateral:Asset ratio.

**Liquidation Process**

Should a borrower's LTV exceed the Maximum LTV limit, any party can settle the debt on behalf of the borrower to receive a corresponding amount of collateral and a liquidation fee. This fee is set at the inception of the pair and remains fixed. Typically, the liquidation fee is 10%, accessible via the liquidationFee() view function on the pair. The maxLTV() function on the pair provides the Maximum LTV value.

**Adapting to Debt Fluctuations**

Liquidators are entitled to resolve a borrower's position once the LTV surpasses the Maximum LTV, usually set around 75%. However, during extreme market swings, it's possible for the LTV to exceed 100% before action can be taken, leading to the accumulation of bad debt. In such cases, the liquidator covers as much of the borrower's debt as the collateral allows, and any remaining debt is subtracted from the total assets lenders are entitled to. This mechanism prevents a rush by lenders to withdraw their funds, which could leave the last lender with valueless lTokens, a scenario often referred to as "bad debt" in other lending platforms. This approach ensures the pair's smooth operation resumes promptly following such incidents.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lenx.gitbook.io/lenx/lenx-lend-v1/health-and-liquidations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
