# Design and Principle of the Liquidation

## Product logic of Larix

Flowchart of User deposits, collateral and borrow limit:&#x20;

![](/files/-MlTuNxZT8DCF1CmMkni)

If the collateral button of an asset is not switched on, then it won’t be liquidated.

### **Parameters:**

* **Collateral factor:**  The maximum amount users can borrow is limited by the collateral factors of the assets they have supplied.&#x20;
* **Liquidation line:** The max debt ratio that an account can achieve before liquidation. It is designed to protect user assets from small price fluctuations.
* **L-Token:** Deposit proof
* **Liquidation Reward:** The reward for liquidation Initiator in the main pool,Bonfida pool,LARIX pool are 8% of the total liquidated value. The reward for liquidation Initiator in the xSOL pool is 2% of the total liquidated value.&#x20;

### &#xD;**Role play：**

![](/files/-MlTuzV5wmSskdveT-hb)

![](/files/-MlTv3ZdVMOCXOh7VA5W)

### **Several possible reasons leading to liquidation:**

#### The floating value of collateral changes:

* Withdrawing part of collateral increases debt ratio
* The price of collateralized token decreases

#### The floating value of borrowings changes:

* The interest of loans continuously increases.
* The price of borrowed assets increases

## Liquidation process:

### **1. Liquidate instruction**

#### 1.1   - Repay the borrowed assets for the liquidated account:

* Only one type of asset can be liquidated each time.
* The ‘asset to repay’ and ‘asset to seize’ can be selected by the liquidator.
* The liquidation limit amount is half that of total borrowed value of the selected token.
* Liquidated\_amount < 0.5 **\*** total\_borrowed\_value\_of\_chosen\_token
* Liquidated\_value \* 1.08 < The\_value\_of\_asset\_to\_seize (Main Pool,Bonfida Pool,LARIX Pool)
* Liquidated\_value \* 1.02 < The\_value\_of\_asset\_to\_seize (xSOL Pool)

#### 1.2 - Seize the mortgaged assets:

* Only one type of asset can be seized each time.
* The\_value\_asset\_to\_seize > 1.08 \* Liquidated\_value (Main Pool,Bonfida Pool,LARIX Pool)
* The\_value\_asset\_to\_seize > 1.02 \* Liquidated\_value (xSOL Pool)

**2. Convert the seized asset**

* Since the seized asset is L-Token, it can be converted back to the corresponding asset.
* The converting function is automatically completed by Larix front-end.

## **Tips:**

During an extreme market event with high volatile token prices that fluctuate greatly, there will be

* more clearable accounts on the platform.
* clearable amounts will be relatively larger
* an increase in the liquidation rewards

Therefore, it will attract more robots for arbitrage and the liquidations will become more timely.


---

# 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://docs.projectlarix.com/liquidation.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.
