# Liquidations

## **Liquidations in Curvance**

Liquidations play a vital role in maintaining the stability and integrity of the Curvance protocol by protecting lenders from potential losses. Liquidations are triggered when Position Health falls below 1 (i.e., collateral capacity at the Margin Requirement is insufficient to cover debt).

### **Understanding Position Health**

Position Health measures how much your collateral capacity at the Margin Requirement covers your current debt.

{% hint style="info" %}
*Position Health = Collateral Capacity at Margin Requirement /* Debt

*Where:*

*Margin Requirement (Soft Collateral Requirement): The minimal collateral buffer required to avoid soft liquidation (e.g., 140%). Curvance applies an auction buffer when evaluating this capacity.*

*Collateral Capacity at Margin Requirement: Your collateral value, weighted by Margin Requirement and Curvance's auction buffer.*

*Debt: Your outstanding debt value in the market.*
{% endhint %}

* If Debt = 0: Position Health is effectively infinite.
* Position Health ≥ 1: sufficiently collateralized (safe under the Margin Requirement).
* Position Health < 1: below the Margin Requirement (eligible for soft liquidation). Hard liquidation uses the hard collateral requirement.

The liquidation engine is proactive and designed to protect borrowers from hard liquidations by implementing a linear scale between "soft" and "hard" liquidation levels. \
\
The severity of liquidations is continuous as collateral runs out and travels along a linear curve from soft liquidation to hard liquidation. The severity of a liquidation is calculated from a user's lFactor or liquidation factor. A liquidation factor of 0 indicates that no liquidation is possible, whereas a liquidation factor of 1 indicates a full hard liquidation.

* **Soft Liquidation:** A partial liquidation occurs with a small penalty, preserving more of the user's collateral, making Curvance more forgiving during times of low volatility.
* **Hard Liquidation**: Full liquidation with a high penalty if the Health Factor is critically low, meaning Curvance can shed risk faster than other lending protocols in times of high volatility.

*Recommendation: Maintaining a Health Factor above 1, ideally at 1.5 or higher during market volatility, is advised to reduce liquidation risk.*

{% hint style="info" %}
For more information on lFactor, check out this page: [Dynamic Liquidation Engine](https://docs.curvance.com/cve/developer-docs/dynamic-liquidation-engine-dle#lfactor-liquidation-factor).
{% endhint %}

***

## **Liquidations in Other Protocols**

Most lending protocols set single-point liquidation levels, creating a trade-off:

* **Overly Conservative Liquidation Levels**: This can lead to premature liquidations, making the user experience less favorable.
* **Overly Generous Liquidation Levels**: This may increase the risk of bad debt within the protocol.

Other lending protocols also tend to only look at three different factors to determine liquidations:

* **Collateralization Ratio:** Determines the maximum borrowing threshold for each asset.
* **Liquidation Threshold:** Equivalent to the Curvance protocol's Hard Liquidation Threshold, this looks at when a position should be liquidated by half or in full.
* **Liquidation Fee:** A fee on the user's collateral value during a liquidation that goes back to the protocol in the form of revenue.

## **Curvance’s Dynamic Liquidation Engine**

The Dynamic Liquidation Engine allows for more flexibility in determining liquidation thresholds, how much of a position gets liquidated, the fee associated with that liquidation, and the incentives for liquidators in each scenario. This is done using the following configurable values:

* **Collateralization Ratio:** Determines the maximum borrowing amount per $1 of collateral for each asset.
* **Soft Collateral Requirement:** The premium of excess collateral required to avoid triggering a soft liquidation.&#x20;
* **Hard Collateral Requirement:** The premium of excess collateral required to avoid triggering a hard liquidation.&#x20;
* **Soft Liquidation Incentive:** The base incentive to liquidate a user position.
* **Hard Liquidation Incentive:** The maximum incentive to liquidate a user position.
* **Liquidation Fee:** The fee the protocol takes from a user's collateral during a liquidation.
* **Base Close Factor:** The % of outstanding user debt that can be closed for a user position.

{% hint style="info" %}
Liquidation Scenario:\
Tony has $1,000 of ETH posted as collateral with $900 in outstanding debt. \
Soft Collateral Requirement = 120%

Hard Collateral Requirement = 110%

Soft Liquidation Incentive = 4%

Hard Liquidation Incentive = 6%

Liquidation Fee = 0%

Base Close Factor = 20%\
\
Tony is below their collateral requirement to avoid soft liquidation (1000 / 120% = $833.33 < $900 but avoids a full hard liquidation (1000 / 110% = $909 !< $900)

Tony has a current lFactor = (900 - (1000 / 120%)) / ((1000 / 110%) - (1000 - 120%)) = 88%\
This results in a liquidation amount of 20% + (100% - 20%) \* 88% = 90.4%,

with a liquidation penalty of 4% + (6% - 4%) \* 88% = 5.76%\
\
Any address could then liquidate Tony by repaying $900 \* 90.4% = $813.6 of their outstanding debt and receive $813.6 \* 105.76% = $860.46 in ETH from Tony.
{% endhint %}

This approach balances the user experience and protocol stability, minimizing the risk of sudden liquidations for borrowers while protecting the protocol and lenders against bad debt.
