Every loan you take in DeFi comes bundled with a single number that the protocol recomputes on every block — roughly every twelve seconds, forever, whether you’re watching or asleep. It’s called the health factor. Above 1, your position is fine and you keep your collateral. Below 1, the doors unlock and the wolves — the liquidators — are allowed in to carve up your collateral for a profit. No phone call, no grace period, no “let me explain.” Just math.
You’ve already met pools, collateral and loan-to-value, and interest-rate models. This lesson is where those ideas turn into a survival metric.
A DeFi borrower's health factor drops from 1.4 to 0.97. What happens?
The health factor formula
Think of the health factor as a structural-integrity gauge for a bridge. The collateral is the steel holding it up — but engineers never rate a bridge at 100% of its theoretical strength; they apply a safety haircut. In lending that haircut is the liquidation threshold. The debt is the load on the bridge. The health factor is rated strength divided by load: above 1 the bridge holds, below 1 it’s failing.
Formally, summing over every collateral asset in your position:
Each collateral asset is valued in dollars, multiplied by its own liquidation threshold (riskier assets get a steeper haircut), then summed. Divide by total debt and you get a unitless number.
Worked example. You deposit 10 ETH at a price of $2,000 each, giving $20,000 of collateral. ETH’s liquidation threshold is 82.5% (0.825). You’ve borrowed $12,000 of a stablecoin. Then:
A health factor of 1.375 means your risk-adjusted collateral is 37.5% larger than your debt. Comfortable, not bulletproof.
Threshold ≠ LTV
The liquidation threshold (when you get liquidated) is higher than the max LTV (the most you can borrow on day one). Aave might let you borrow at 80% LTV but only liquidate at 82.5%. That gap is a deliberate buffer — don’t confuse the two numbers when you compute your own risk.
See it move
Drag the collateral price and watch the gauge slide. Notice there’s nothing you do in this widget to raise the price — that’s the point. Your collateral’s value is set by the market, not by you, and the health factor inherits all of that volatility.
Liquidation threshold: 82.5% · 10 × $2,000 · health factor vs $12,000
- Collateral value
- $20,000
- Health factor
- 1.38
- Health factor
- At risk
Drag the collateral price. The health factor is your collateral value times the liquidation threshold, divided by your debt. Cross below 1.0 and the position can be liquidated.
When HF < 1, you’re liquidatable
“Liquidatable” doesn’t mean you will be liquidated this instant — it means the protocol now permits anyone to liquidate you. In practice “permitted” and “done” are milliseconds apart, because bots are watching.
Three forces move your health factor, and two of them work against you:
- Collateral price falls → numerator shrinks → HF drops. The big one.
- Debt grows via accrued interest → denominator rises → HF drops. Slow but relentless.
- Threshold or price recovers → HF rises. The only friendly direction, and not under your control.
Worked example — the liquidation price. Take our 10 ETH / $12,000 position. At what ETH price does HF hit exactly 1? Set HF = 1 and solve for price:
So a drop from $2,000 to about $1,454 — a 27% slide — wipes out your entire buffer. ETH has moved that much in a single bad day more than once. This is why “HF 1.375” is comfortable, not bulletproof.
Fill in the blanks about what drives the health factor.
Pick the right option for each blank, then check.
A collateral price pushes the health factor down, and on the debt pushes it down too. The position becomes liquidatable the moment HF drops below .
Liquidators and keepers
So who are the wolves? Liquidators (often called keepers) are bots. They watch every open position across the protocol, and the instant one crosses HF < 1 they call the liquidation function: they repay part of your debt out of their own pocket, and in exchange they seize a chunk of your collateral — at a discount. That discount is their profit, and it’s why they bother.
It sounds predatory, but the protocol wants this to happen, and here’s the key insight: liquidation isn’t punishment, it’s solvency maintenance. If a position’s debt ever exceeds its collateral, the lenders in the pool eat the loss — their deposited funds become unrecoverable. Liquidators close risky positions before they go underwater, keeping the pool fully backed and depositors whole. It’s a permissionless, profitable public service: anyone with capital and a bot can do it, and the competition makes liquidations fast and cheap for the protocol.
Because the protocol has no employees and no margin desk. A bank has staff who chase delinquent loans; a smart contract has no one. The only way to guarantee bad positions get closed promptly is to make closing them profitable for strangers. The discount is a bounty: it turns thousands of anonymous bots into a 24/7 risk department that the protocol never has to pay a salary. Ban the bounty and underwater positions would just sit there, quietly draining lenders.
The liquidation penalty and the close factor
Two parameters govern the cleanup.
The liquidation penalty (also called the liquidation bonus, depending on whose side you’re on) is the discount the liquidator gets on your collateral — typically 5–10%. If they seize $1,000 of collateral, they only had to repay, say, $950 of your debt to get it. That $50 gap is the liquidator’s reward and your extra cost.
The close factor caps how much of your debt can be repaid in a single liquidation — commonly 50%. This stops a liquidator from nuking your entire position over a tiny dip; they can only clear up to half at once. (If you’re still unhealthy after that, you can be liquidated again.)
Worked liquidation. Your $12,000 position crosses HF < 1. A liquidator steps in with a 50% close factor and a 8% liquidation penalty:
| Step | Amount |
|---|---|
| Debt repaid by liquidator (50% close factor) | $6,000 |
| Collateral seized = repaid × (1 + penalty) = 6,000 × 1.08 | $6,480 |
| Liquidator’s profit (the 8% bonus) | $480 |
| Your remaining debt | $6,000 |
| Your remaining collateral (was $20,000 − $6,480) | $13,520 |
You lost $6,480 of collateral to retire $6,000 of debt — the extra $480 is the penalty you paid for letting HF slip under 1. Liquidation isn’t free; the bonus comes straight out of your equity.
A $20,000 borrow position is liquidated with a 50% close factor and a 10% liquidation penalty. How much collateral does the liquidator seize?
Which statement is almost right but wrong in one important way?
How to not get liquidated
The whole game is keeping HF comfortably above 1 — not at 1, comfortably above. Your levers:
- Keep a buffer. Borrow well under your max so a normal market wobble doesn’t reach HF 1.
- Repay debt to shrink the denominator.
- Add collateral to grow the numerator.
- Avoid volatile collateral, or expect a bigger buffer if you use it.
- Watch correlated crashes. If all your collateral assets fall together, diversification won’t save you.
| HF zone | What it means | What to do |
|---|---|---|
| HF ≥ 2.0 | Very safe; lots of room | Could borrow a bit more if you want |
| 1.5 ≤ HF < 2.0 | Healthy buffer | Maintain; monitor on volatile days |
| 1.1 ≤ HF < 1.5 | Getting tight | Add collateral or repay soon |
| 1.0 ≤ HF < 1.1 | Danger zone | Act now — one tick down and you’re liquidatable |
| HF < 1.0 | Liquidatable | Too late; liquidators may already be acting |
Sort each action by its effect on your health factor.
Place each item in the right group.
- Borrowing more against the same collateral
- Repaying part of your debt
- Your collateral's price rising
- Your collateral's price crashing
- Interest accruing on your debt
- Adding more collateral
Match each term to its meaning.
Pick a term, then click its definition.
Big picture
- Health factor & liquidations
- Formula
- (collateral × liqThreshold) / debt
- Unitless; recomputed every block
- Boundary
- HF ≥ 1 safe
- HF < 1 liquidatable
- What moves it
- Collateral price (down = bad)
- Accrued interest (up = bad)
- Liquidation mechanics
- Liquidators / keeper bots
- Close factor caps repay (~50%)
- Penalty / bonus (~5–10%)
- Staying safe
- Keep a buffer
- Repay or add collateral
- Watch correlated crashes
- Formula
Key Takeaways
What to remember
- HF = (Σ collateral × liquidation threshold) ÷ total debt. Above 1 you’re safe; below 1 you can be liquidated — instantly, with no warning.
- Falling collateral prices and accrued interest both push HF down. Only price recovery, repayment, or adding collateral pushes it back up.
- Liquidation isn’t punishment, it’s solvency maintenance. Keeper bots close risky positions before they go underwater, keeping lenders whole.
- The close factor caps a single liquidation (often 50%); the penalty (5–10%) is your cost — extra collateral seized straight out of your equity.
- Keep a real buffer. A 27% price drop took our HF 1.375 position to the brink. Borrow well below your max.
Next up: flash loans, oracle risk, and advanced features — including how a single manipulated price feed can trigger liquidations that should never have happened.
A position holds $30,000 of collateral with a 0.80 liquidation threshold and owes $16,000. What is the health factor?
Check your answer to continue.