Liquidation Mathematics

Now let’s build up the mathematical framework that makes this system work. We’ll start simple and add complexity as we go.

Understanding the Two LTV Perspectives

Every position in Twyne has two different LTV calculations that matter:

  1. Twyne LTV represents how leveraged the borrower is from their own perspective:

λt=BC\lambda_t = \frac{B}{C}

Where B is the borrowed amount and C is the borrower’s own collateral.

  1. External LTV represents how the position looks to the underlying protocol:

λe=BC+CLP \lambda_e = \frac{B}{C + C_{LP}}

Where CLP C_{LP} is the additional collateral provided by Credit LPs.

The magic happens in the relationship between these two values. While λt\lambda_t might be 85% (quite risky), λe\lambda_e might only be 70% (quite safe). This gap is what Twyne exploits to provide additional borrowing power.

The Liquidation Conditions

A position becomes liquidatable in Twyne when EITHER of these conditions is met:

Condition 1: Twyne Threshold Breached

B>λ~t×C B > \tilde{\lambda}_t \times C

This checks if the borrower’s debt exceeds what’s allowed given their chosen Twyne liquidation LTV λ~t \tilde{\lambda}_t and their own collateral.

Condition 2: External Safety at Risk

B>βsafe×λ~e×(C+CLP) B > \beta_{\text{safe}} \times \tilde{\lambda}_e \times (C + C_{\text{LP}})

This ensures we maintain a safety buffer (, typically 95%) below the external protocol’s liquidation threshold.

Let’s understand why we need both conditions through an example:

Imagine Alice has:

  • 1 ETH of her own collateral (C = 1)

  • 0.5 ETH reserved from CLPs ( CLP C_{LP} = 0.5)

  • 0.8 ETH worth of debt (B = 0.8)

  • Chosen Twyne liquidation LTV of 85% ( λ~t \tilde{\lambda}_t = 0.85)

  • External protocol liquidation LTV of 75% ( λ~e \tilde{\lambda}_e = 0.75)

  • Safety buffer of 95% ( βsafe \beta_{\text{safe}} = 0.95)

Let’s check both conditions:

  • Condition 1: 0.8 > 0.85 × 1 = 0.85 ✗ (Not triggered)

  • Condition 2: 0.8 > 0.95 × 0.75 × 1.5 = 1.069 ✗ (Not triggered)

Alice’s position is safe. But if her debt increases to 0.86 ETH:

  • Condition 1: 0.86 > 0.85 × 1 = 0.85 ✓ (Triggered!)

  • Condition 2: 0.86 > 1.069 ✗ (Still safe)

Now Twyne will liquidate her position even though the external protocol still sees it as safe. This is the key to protecting CLPs.

Last updated