# Liquidations in Stacks Market V2

## Limitations of Liquidations in V1

In v1, liquidation worked on an all-or-nothing basis. Once a position crossed its liquidation threshold, the protocol treated the entire position as unsafe and liquidated it in full.&#x20;

There was no partial unwind, no buffer for market noise, and no opportunity for the user to intervene. A small price move could trigger a complete liquidation, creating sharp cliffs for users and forcing liquidators to absorb large, sudden positions

## Liquidations Improvements in V2

V2 replaces the v1 model with a predictable liquidation curve defined by a slope from partial to full liquidation and an exponent that controls how quickly it accelerates.&#x20;

This removes liquidation cliffs, makes outcomes more predictable, improves conditions for liquidators, and strengthens overall system stability.

Each collateral–debt pair now has a partial and a full liquidation threshold, giving users room to react. For example, with sBTC as collateral and USDC as the debt asset, partial liquidation begins at 85% LTV and full liquidation occurs at 95%. Penalties are no longer fixed; they move within a defined range to provide additional protection.

## Liquidations Deep Dive

Liquidations are the safety mechanism that protects Zest Protocol from bad debt. When borrowers' positions become undercollateralized, liquidators can step in to repay debt in exchange for collateral at a discount, restoring the health of the protocol.

### Understanding Position Health

Your position health is measured by your **LTV ratio** (Loan-to-Value):

```
Current LTV = Debt Value / Collateral Value × 100%
```

As asset prices fluctuate, your LTV changes:

* **Collateral price drops** → LTV increases (worse health)
* **Debt asset price increases** → LTV increases (worse health)
* **Collateral price rises** → LTV decreases (better health)
* **Debt asset price drops** → LTV decreases (better health)

### Three LTV Thresholds

Each Risk Group defines three critical LTV thresholds that determine position status:

#### 1) LTV-BORROW (Borrowing Threshold)

**Purpose:** Maximum LTV for healthy borrowing operations.

It controls new borrow requests, collateral withdrawal requests, adding new debt types

```
Example (sBTC → USDC, LTV-BORROW = 70%):

Collateral: $10,000 sBTC
Max Healthy Debt: $7,000 USDC
Current Debt: $6,500 USDC
Current LTV: 65% < 70% ✓ Healthy
Can borrow: $500 more USDC
```

#### 2) LTV-LIQ-PARTIAL (Partial Liquidation Threshold)

**Purpose:** Point at which partial liquidation becomes allowed.

Position is unhealthy but not critically so liquidators can just repay portion of debt with the goal to restore position to healthy status. Liquidator receives minimum penalty bonus (5%)

```
Example (sBTC → USDC, LTV-LIQ-PARTIAL = 85%):

Collateral: $10,000 sBTC
Debt: $8,600 USDC
Current LTV: 86% > 85% ✗ Liquidatable
Status: Partial liquidation allowed
Liquidator can: Repay enough to bring LTV back below 70%
```

#### 3) LTV-LIQ-FULL (Full Liquidation Threshold)

**Purpose:** Point at which complete position clearing becomes allowed.

**What It Means:**

* Position is severely undercollateralized
* Liquidators can clear the entire position
* Liquidator receives maximum penalty bonus (10%)
* Higher urgency to protect protocol from bad debt

```
Example (sBTC → USDC, LTV-LIQ-FULL = 90%):

Collateral: $10,000 sBTC
Debt: $9,200 USDC
Current LTV: 92% > 90% ✗ Critically Undercollateralized
Status: Full liquidation allowed
Liquidator can: Repay all debt and seize all collateral
```

### Threshold Spacing

The spacing between thresholds provides a safety buffer system:

**Example: sBTC → USDC Group**

* LTV-BORROW: 70%
* LTV-LIQ-PARTIAL: 85% (+15 percentage points)
* LTV-LIQ-FULL: 90% (+5 percentage points)

**Buffer Analysis:**

* **15% buffer** from healthy to liquidatable: accommodates moderate price movements
* **5% additional buffer** before full liquidation: allows time for partial liquidations to work
* **Total 20% buffer** from healthy to critically undercollateralized

**Different groups have different buffers with c**onservative groups have tighter buffers while less volatile groups have wider buffers.

### Graduated Liquidation Penalties

V2 introduces dynamic penalties that scale based on position health rather than fixed liquidation bonuses.

#### Penalty Formula

```
penalty = min + (max - min) × ((current_ltv - partial_ltv) / (full_ltv - partial_ltv))^exponent
```

**Where:**

* `min` = Minimum penalty (5% in all current groups)
* `max` = Maximum penalty (10% in all current groups)
* `current_ltv` = Position's current LTV ratio
* `partial_ltv` = LTV-LIQ-PARTIAL threshold
* `full_ltv` = LTV-LIQ-FULL threshold
* `exponent` = Curve exponent (1.0 = linear in all current groups)

### Penalty Curve Examples

**sBTC → USDC (Partial: 85%, Full: 90%)**

| Current LTV | Position in Range    | Penalty |
| ----------- | -------------------- | ------- |
| 85.0%       | At partial threshold | 5.0%    |
| 86.0%       | 20% through range    | 6.0%    |
| 87.0%       | 40% through range    | 7.0%    |
| 87.5%       | 50% through range    | 7.5%    |
| 88.0%       | 60% through range    | 8.0%    |
| 89.0%       | 80% through range    | 9.0%    |
| 90.0%       | At full threshold    | 10.0%   |

### Why Graduated Penalties?

**Smoother Liquidations:** Positions closer to healthy status receive smaller penalties, encouraging early intervention.

**Risk-Appropriate Rewards:** Liquidators taking on riskier positions (higher LTV) receive larger bonuses.

**Reduced Borrower Impact:** Borrowers whose positions are just barely liquidatable lose less to liquidation penalties.

**Market Efficiency:** Creates continuous incentive gradient rather than cliff effects at fixed penalty levels.

## Summary

Zest V2's liquidation system provides sophisticated risk management through:

* **Three-tier thresholds:** Borrow, Partial, Full create safety buffers
* **Graduated penalties:** 5-10% scaling based on position health
* **Partial liquidations:** Restore positions to healthy status when possible
* **Full liquidations:** Clear critically undercollateralized positions
