DocumentationOpen App

Health Factor & Risk

The Health Factor is the core solvency metric in Gearbox. It determines whether a Credit Account is healthy, at risk, or liquidatable. Understanding how it's calculated — and the mechanisms that manage risk — is essential for building on the protocol.

Health Factor

The Health Factor (HF) is the ratio of risk-adjusted collateral value to total debt:

Health Factor = Total Weighted Value (TWV) / Total Debt
  • HF >= 1 — account is solvent
  • HF < 1 — account is liquidatable

Total Weighted Value (TWV)

TWV is not simply the market value of collateral. Each token's value is discounted by its Liquidation Threshold (LT) and capped by its Quota:

TWV = Sum( min(Quota_i, Balance_i * Price_i * LT_i) ) / Price_underlying

For example, if an account holds $100 of ETH with an LT of 90%, the system values it at $90 for solvency purposes.

Total Debt

Total Debt = Principal + Base Interest + Quota Interest + Fees
  • Principal — the amount borrowed from the Pool
  • Base Interest — accrued from the Pool's utilization-based interest rate
  • Quota Interest — additional rate for each collateral token based on its risk profile
  • Fees — quota increase fees and other protocol charges

Liquidation Thresholds

Each collateral token has a Liquidation Threshold (LT) — a percentage that determines how much of its value counts toward solvency:

TokenLTMeaning
WETH90%$100 of ETH counts as $90
WBTC85%$100 of BTC counts as $85
CRV72%$100 of CRV counts as $72

Higher LT = more leverage possible. Lower LT = more conservative, safer.

LT changes use a ramping mechanism — they interpolate linearly over a minimum of 24 hours, preventing sudden liquidation cascades.

Quota System

Quotas are per-token exposure limits that cap how much of each collateral asset counts toward solvency across the system:

  1. Quota Limits — hard caps on total debt backed by a specific collateral asset. Prevents over-concentration in a single token.

  2. Quota Rates — additional interest charged based on collateral risk. A volatile governance token might carry +5% quota rate on top of the base rate.

Total APR = Base Rate (from Pool utilization) + Quota Rate (from collateral risk)

Dual Oracle System

Every collateral asset has two independent price feeds:

  • Main Feed — used for solvency calculation and liquidation triggers. Often a fundamental/backing price (e.g., exchange rate from the token contract).
  • Reserve Feed — used for safety validation during user operations. Often a market price (e.g., Chainlink spot).

The system uses the safe price — the minimum of both feeds — for operations like withdrawals and debt increases. This creates an automatic circuit breaker against price manipulation or oracle failures.

Safe Price = min(Main Price, Reserve Price)

Liquidations

When HF drops below 1, anyone can liquidate the account:

Partial Liquidation (Deleverage)

  • Triggered when HF is below target but account is still partially solvent
  • Sells only enough collateral to restore HF to a target level
  • Lower premium than full liquidation
  • Executed by the Deleverage Bot

Full Liquidation

  • Triggered when HF < 1 significantly
  • Liquidator repays total debt and claims all collateral at a discount
  • Liquidator profit = collateral value × liquidation premium - gas cost

Bad Debt

If collateral value is less than total debt after liquidation:

  1. Unclaimed protocol fees (Treasury LP shares) are burned to cover the shortfall
  2. Any remaining loss is socialized across all Pool LPs via Diesel Token exchange rate reduction

Loss Policy

The Loss Policy prevents liquidation cascades during market crashes. Instead of immediately liquidating at distressed market prices:

  1. Check if HF < 1 using market price
  2. If bad debt would result, recheck using fundamental (aliased) price
  3. Only liquidate if the account is fundamentally insolvent

This protects against flash crash scenarios while still handling genuine insolvency.

Learn More