# Liquidations

Liquidations are a critical mechanism that ensures the stability, solvency, and safety of the lending markets. When a borrower's position becomes undercollateralized — meaning the **Loan-to-Value (LTV)** ratio exceeds the market's **Liquidation Loan-to-Value (LLTV)** threshold — the position becomes eligible for liquidation. This process safeguards lenders by allowing the protocol to recover the borrowed funds while preventing systemic risk.

### Liquidation Bonus

In Dahlia, a **liquidation bonus** is applied as a fee paid by the borrower to the liquidator. This bonus is deducted from the borrower's collateral upon liquidation and serves as an incentive for liquidators to repay the borrower's debt.

#### Key Characteristics:

* **Set by Market Deployer**: The market deployer determines the liquidation bonus at the time of market creation.
* **Adjustable by Market Admin**: Post-deployment, the market admin can adjust the bonus to align with evolving market dynamics.
* **Upper Bound**: The liquidation bonus cannot exceed **¾** of the difference between the LLTV and 100%.

This mechanism ensures that liquidators are fairly incentivized while maintaining a buffer between the **LLTV + Liquidation Bonus** and **100% LLTV**. This buffer provides critical time and room for liquidators to process liquidations efficiently, reducing the likelihood of bad debt.

#### Steps in the Liquidation Process:

1. **Determine Eligibility**: The borrower's position is flagged for liquidation once the LLTV threshold is breached.
2. **Seize Collateral**: The protocol calculates the amount of collateral to be seized, factoring in the liquidation bonus for the liquidator's reward.
3. **Full or Partial Repayment**: The liquidator repays the borrower's outstanding debt, and the corresponding collateral — including the liquidation bonus — is transferred to the liquidator.
4. **Handle Bad Debt**: If the seized collateral is insufficient to cover the borrower's debt, the remaining shortfall is marked as **bad debt**.

<figure><img src="https://2553671868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOoSolEmscLg1aJl6FXxT%2Fuploads%2FVQwwvNgsCbBxI6jZfZrY%2Fimage.png?alt=media&#x26;token=ef0cf4dc-f105-4647-9284-e0fead04119e" alt=""><figcaption><p>Full Liquidation Process (Example)</p></figcaption></figure>

### Reserve Fees and Bad Debt

To mitigate the risks associated with bad debt, Dahlia incorporates **reserve fees** into its risk management framework.

#### How Reserve Fees Work:

* **Governance-Enabled**: Reserve fees can be enabled or adjusted by governance as needed.
* **Collected from Borrowers**: A portion of borrower payments is directed to the reserve pool.
* **Forms a Safety Buffer**: The reserve pool acts as insurance, helping cover unexpected losses from liquidations where collateral is insufficient.

#### Handling Bad Debt:

In the event of bad debt:

1. The protocol attempts to use funds from the **reserve pool** to cover the shortfall.
2. This reduces the impact on lenders and maintains the financial health of the market.
