What is a health factor, and how does a liquidation actually work?
A liquidation is not a margin call. Nobody phones, nothing is negotiated and there is no grace period. It is an open invitation, published on-chain, for any stranger to repay part of your debt in exchange for a discounted slice of your collateral. Here is the arithmetic that decides when that invitation goes out.
The health factor
Most lending protocols compress a position into one number:
health factor = Σ(collateral value × liquidation threshold) ÷ total borrowed
Above 1, the position is not currently liquidatable — which is a narrower statement than safe. It means that at this instant, at the prices the oracle is reporting, under today's parameters, nobody may take your collateral. Prices move, oracles update, and governance changes liquidation thresholds. Below 1, anyone may liquidate it. The threshold-weighted numerator is the key detail: a protocol does not count your collateral at face value, it counts what it believes it could realise.
Worked. $10,000 of ETH collateral, liquidation threshold 82.5%, $5,000 borrowed:
HF = (10,000 × 0.825) ÷ 5,000 = 8,250 ÷ 5,000 = 1.65
Borrow $7,500 against the same collateral:
HF = 8,250 ÷ 7,500 = 1.10
And the collateral value at which each hits 1.00:
- At $5,000 debt: 5,000 ÷ 0.825 = $6,060.61 → a 39.4% fall
- At $7,500 debt: 7,500 ÷ 0.825 = $9,090.91 → a 9.09% fall
A health factor of 1.10 sounds like a 10% buffer. It is a 9.09% buffer — because 1/1.10 = 0.909. The health factor is a ratio, and the price move that kills it is 1 − 1/HF, not HF − 1. This is worth writing down.
Note also that with multiple collaterals and multiple debts, every asset's price moves the same single number. A position can be liquidated by something the borrower was not thinking about.
The liquidation itself
Once HF < 1, a liquidator — usually a bot watching every block — calls the protocol's liquidation function. Two parameters govern what happens:
- Close factor — the maximum share of the debt that may be repaid in one liquidation, commonly up to 50%.
- Liquidation bonus (penalty) — the discount at which the liquidator receives collateral, commonly 5–10%. It is the liquidator's fee, paid by the borrower.
Worked. ETH falls to $1,800. The borrower holds 5 ETH ($9,000) against $7,500 of debt.
HF = (9,000 × 0.825) ÷ 7,500 = 7,425 ÷ 7,500 = 0.99 → liquidatable.
A liquidator repays 50% of the debt = $3,750, and receives collateral worth 3,750 × 1.05 = $3,937.50, which at $1,800 is 2.1875 ETH.
The borrower is left with 5 − 2.1875 = 2.8125 ETH ($5,062.50) and $3,750 of debt:
HF = (5,062.50 × 0.825) ÷ 3,750 = 4,176.56 ÷ 3,750 = 1.11
The position is restored to health, and the $187.50 bonus came out of the borrower's collateral. The system did not fail. The borrower paid for its correct operation.
Why the bonus exists — and when the machine breaks
The bonus is not a punishment for its own sake. It is the incentive that makes someone spend gas, take on inventory risk and act within a block. Set it too low and nobody liquidates; set it too high and borrowers are over-penalised. It is a calibrated payment for a service the protocol cannot perform itself.
Which is exactly why liquidation is a dependency, not a guarantee. It fails when:
- the price gaps faster than liquidators can transact;
- network congestion makes gas costs exceed the bonus, so the trade is unprofitable and nobody takes it;
- the collateral is too illiquid to sell without moving the price more than the bonus;
- the oracle is stale or wrong (Unit 4).
When liquidation fails, the protocol is left with bad debt — borrowings no longer covered by collateral — and the loss lands on the protocol's reserve, its token holders, or ultimately its depositors. Black Thursday in Unit 3 lesson 1 is the documented example: auctions cleared at zero and a multi-million-dollar shortfall had to be socialised.
Nothing here suggests borrowing, providing collateral or running liquidations. It describes a mechanism so that you can read a position's arithmetic rather than a protocol's dashboard.
Try it now
- Read the current price off the chart below and build a position on paper: $50,000 collateral, 82.5% threshold, $30,000 debt. Compute the health factor, then the price at which HF = 1, then the percentage fall that implies.
- Drop a Level at your HF = 1 price. Then run the liquidation on paper: at a 50% close factor and a 5% bonus, how much debt is repaid, how much collateral leaves, and what is the resulting health factor? Note that the position survives and is now smaller — a liquidation is not a closure.
- Measure the largest one-day fall in the five years on screen. What is the highest debt level your position could have carried and still been above your Level at the end of that day?