# Design and Principle of the Liquidation

## Product logic of Larix

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

![](https://848535212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McigJh3HTmoYFcYyFW_%2F-MlTrp-cPLRr2e8IeM-n%2F-MlTuNxZT8DCF1CmMkni%2F11.png?alt=media\&token=75fe9f61-c2c4-4475-951c-b8097848c6f7)

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：**

![](https://848535212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McigJh3HTmoYFcYyFW_%2F-MlTrp-cPLRr2e8IeM-n%2F-MlTuzV5wmSskdveT-hb%2Fimage.png?alt=media\&token=92063f3c-9dd0-4ba7-ab9d-b2fd8769dc31)

![](https://848535212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McigJh3HTmoYFcYyFW_%2F-MlTrp-cPLRr2e8IeM-n%2F-MlTv3ZdVMOCXOh7VA5W%2Fimage.png?alt=media\&token=5a3cbd85-753b-4121-aee7-781347d5d66c)

### **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.
