Definition
Health factor (HF) compares an account’s liquidation-threshold-weighted collateral against its total debt, both valued in USD-WAD (10^18):
i128::MAX — an effectively infinite health factor. An
account is liquidatable when HF < 1e18 (one WAD).
The two sides round in opposite directions on purpose. Collateral floors at
every step, so it can never be overstated. Debt ceils, so it can never be
understated. Both errors would favour the account; neither is allowed.
One exception: the read-only get_total_borrow_usd view rounds half-up. It is a
display number, not a solvency input.
Each term is built from a scaled position, its market index, and the asset
price:
AccountPositionRaw) from
the account’s spoke asset config. The health factor is always evaluated
post-execution on cached indexes, so a borrow or withdraw is checked against the
state it would produce.
Health factor is separate from the LTV gate. Borrow and withdraw
additionally require
Σ position_value(supply_i) · loan_to_value_i / BPS ≥ total_debt_usd. Because
LTV is always below the liquidation threshold, an account reaches its borrow
limit before it becomes liquidatable.Worked example
An account supplies 500. All USD values are WAD-scaled, so 500 is500e18.
1.56e18, comfortably above the 1e18 boundary, so the
account is solvent and not liquidatable. If the collateral price halved,
weighted_collateral would fall to 390e18 and HF to 0.78e18 — below 1e18,
and the account would become liquidatable. Recompute after any supply, borrow,
repay, withdraw, price change, or liquidation.
Decision table
Edge cases
Next
Liquidations
What happens once an account crosses below
HF = 1.Risk parameters
The liquidation thresholds and LTVs that weight the formula.
Accounts and risk
Position snapshotting, spoke risk, and risk gates.
Oracles
The prices that feed every position value.

