> For the complete documentation index, see [llms.txt](https://docs.layerbank.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerbank.finance/protocol/lending/collateral-and-liquidation.md).

# Collateral & Liquidation

When borrowing on LayerBank, the value of your collateral determines how much you can borrow and whether your position is safe.\
If your **borrowed value** grows too close to your collateral value (due to price drops or interest accrual), your position becomes at risk of **liquidation**.

***

### **Max LTV (Loan-to-Value)**

**Max LTV** is the maximum percentage of your collateral’s value that can be borrowed.

$$
Max\ LTV = \frac{\text{Borrow Limit}}{\text{Collateral Value}}
$$

**Example:**\
If the Max LTV for USDC is **80%**, and you supply **100 USDC**, you can borrow up to **80 USDC**.

***

### **Borrow Limit Calculation**

If you have multiple collaterals, your total **Borrow Limit** is determined by the **weighted average** of all supplied assets and their Max LTVs:

$$
Borrow\ Limit = \sum\_i (Collateral\_i \times Price\_i \times MaxLTV\_i)
$$

This ensures a diversified portfolio reflects an appropriate combined risk level.

***

### **Health Factor (HF)**

Your position safety is measured by **Health Factor**:

$$
HF = \frac{\text{Borrow Limit}}{\text{Borrowed Value}}
$$

* **HF > 1.0:** Safe (below max LTV).
* **HF = 1.0:** At risk (exactly at max LTV).
* **HF < 1.0:** Liquidation can be triggered.

***

### **Liquidation Process**

When HF < 1.0 (loan exceeds allowed LTV), a partial liquidation occurs:

1. Up to 50% of the borrower's debt is repaid by a liquidator.
2. The liquidator receives a 15% liquidation incentive (bonus collateral).
3. Remaining collateral is returned to the borrower.
4. Health Factor is restored above 1.0, making the position safe again.

***

### **Key Points**

* Liquidation is **partial** — only enough collateral is sold to bring HF back above 1.0.
* The liquidation incentive rewards third-party liquidators and keeps the protocol solvent.
* Maintaining a safe HF (e.g., >1.2) is recommended to avoid liquidation during volatile markets.

{% hint style="info" %}
Liquidations are executed automatically. In such events, LayerBank closes the borrower's position, reallocates the collateral value to the lending pool, and returns any residual assets to the borrower.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.layerbank.finance/protocol/lending/collateral-and-liquidation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
