Module 9: DeFi Deep Dive
Health Factor and Liquidations
Chapter 6 of 14 · about 5 minutes
6.1 How far can ETH fall?
Node's loan from Chapter 5 was simple: 10 ETH as collateral, $15,000 USDC borrowed. Now Node wanted to know exactly how safe it was.
"If ETH crashes, when does the protocol sell my collateral?" asked Node.
"There's a single number that tells you," said Hash. "It's called the health factor. Learn to calculate it, and you'll never be surprised by a DeFi liquidation."
6.2 The health factor
Most lending protocols use a health factor to measure how safe a position is.
Health factor = (collateral value × liquidation threshold) ÷ debt value
| Health factor | Meaning |
|---|---|
| Above 2 | Comfortable buffer |
| 1.5 to 2 | Moderate buffer |
| 1 to 1.5 | Getting risky |
| Below 1 | Eligible for liquidation |
For Node's position:
| Value | |
|---|---|
| Collateral | 10 ETH × $3,000 = $30,000 |
| Liquidation threshold | 82.5% |
| Debt | $15,000 |
| Health factor | ($30,000 × 0.825) ÷ $15,000 = 1.65 |
Chapter 6 · Health factor and liquidation
Health factor equals collateral value times the liquidation threshold divided by debt. A position with a health factor of 1.65 is safe, but as collateral falls toward a liquidation price it approaches one. At that point a liquidator repays up to half the debt and takes the collateral plus a bonus.
6.3 Liquidation price
To find the ETH price at which Node's health factor reaches 1:
Liquidation price = debt ÷ (collateral amount × liquidation threshold)
= $15,000 ÷ (10 × 0.825) = $1,818
| ETH price | Collateral value | Health factor |
|---|---|---|
| $3,000 | $30,000 | 1.65 |
| $2,500 | $25,000 | 1.38 |
| $2,000 | $20,000 | 1.10 |
| $1,818 | $18,180 | 1.00: liquidation threshold |
| $1,600 | $16,000 | 0.88: liquidated |
ETH would need to fall about 39% from $3,000 for Node's position to be liquidated.
"Thirty-nine percent sounds like a lot," said Node.
"In crypto, it's happened in weeks," said Hash. "Module 1, Chapter 13 showed drawdowns of 75% or more. Your buffer is reasonable, but not unlimited."
6.4 Interest makes debt grow
Debt isn't fixed. Interest accrues continuously, increasing what you owe, and slowly lowering your health factor even if prices don't move.
| Value | |
|---|---|
| Debt | $15,000 |
| Borrow rate | 8% a year (illustrative) |
| Debt after one year, if not repaid | ~$16,200 |
| New liquidation price, ETH unchanged | ~$1,964 |
If borrow rates spike during market stress (Chapter 5), debt grows even faster.
6.5 How liquidation works
When a position's health factor falls below 1, anyone can liquidate it. Typically, liquidators, usually bots (Module 3, Chapter 11), compete to do so because it's profitable.
- The liquidator repays part of the borrower's debt, often up to 50%, using their own funds.
- In return, they receive the borrower's collateral equal to the repaid amount plus a liquidation bonus.
- The borrower's debt and collateral both shrink, and the health factor improves.
Node's liquidation, if ETH fell to $1,800:
| Step | Value |
|---|---|
| Debt | $15,000 |
| Liquidator repays (50%) | $7,500 |
| Liquidation bonus | 5% |
| Collateral taken from Node | $7,500 × 1.05 = $7,875 of ETH, about 4.38 ETH |
| Node's remaining collateral | About 5.62 ETH |
| Node's remaining debt | $7,500 |
Node's loss from the liquidation itself is the $375 bonus paid to the liquidator. But Node has also effectively sold 4.38 ETH near the bottom of a crash, and lost that exposure if the price recovers.
Unlike centralised exchange liquidations (Module 7, Chapter 8), DeFi liquidations are usually partial and transparent. But they happen automatically, at any hour, with no warning call.
6.6 When liquidations fail: bad debt
Liquidation depends on collateral being worth more than the debt when liquidators act. In extreme conditions, this can fail:
| Cause | Effect |
|---|---|
| Price crashes faster than liquidators can act | Collateral falls below the debt value |
| Illiquid collateral | Liquidators can't sell the collateral without huge losses, so they don't act |
| Oracle failure or delay | Liquidations are triggered late, or at wrong prices (Module 3, Chapter 12) |
| Network congestion | High gas prices make small liquidations unprofitable |
When collateral is worth less than the debt, the protocol is left with bad debt. Protocols may cover it with reserves, insurance funds, or a safety module funded by stakers, or the loss may fall on lenders. This is why lenders care about the quality of collateral a protocol accepts (Module 5, Chapter 10).
6.7 Protecting your position
| Action | Effect |
|---|---|
| Borrow conservatively | Keep the health factor well above 1, for example 2 or higher |
| Monitor regularly | Set alerts on health factor or ETH price |
| Add collateral | Raises the health factor |
| Repay part of the debt | Raises the health factor |
| Use stable or correlated collateral | Reduces volatility relative to debt |
| Watch borrow rates | Rising rates increase debt faster |
| Automated protection tools | Some services automatically repay or add collateral when thresholds are hit, adding their own smart contract risk |
Node set an alert for a health factor of 1.3, around an ETH price of $2,360, as a signal to add collateral or repay some debt.
"So the plan is to act long before the protocol acts for me," said Node.
"Exactly," said Hash. "Same principle as stops in perps (Module 7, Chapter 14). Liquidation should never be your plan."
6.8 Try it yourself
Using the formulas in sections 6.2 and 6.3, calculate the health factor and liquidation price for a position of 5 ETH collateral and $6,000 borrowed, using a liquidation threshold of 82.5% and today's ETH price. Then calculate how both change if you borrow $3,000 more, or if ETH falls 30%.
Key takeaways from this chapter
- The health factor equals collateral value times liquidation threshold, divided by debt; below 1, a position can be liquidated.
- The liquidation price can be calculated directly from debt, collateral amount, and threshold.
- Interest accrues on debt, slowly reducing the health factor even if prices don't move.
- Liquidators repay part of the debt and receive collateral plus a bonus; DeFi liquidations are often partial.
- Fast crashes, illiquid collateral, oracle failures, and congestion can create bad debt for protocols.
- Borrow conservatively, monitor, set alerts, and add collateral or repay before the protocol liquidates you.