Health Factor Explained: How to Avoid Liquidation in DeFi Lending

·7m read·By the Zeeria team

Every DeFi lending dashboard you'll ever use puts the same number in front of your face: the health factor. It looks abstract — 1.42, 1.85, ∞. It's actually the most important number in your position. Understand it and you'll know exactly when to top up, repay, or relax. Misunderstand it and you get liquidated.

The formula

health factor = (collateral USD × liquidation threshold) ÷ debt USD

The liquidation threshold is a per-asset constant set by the protocol's risk team. On Zeeria it's 75% for WBTC. On Aave it varies by asset — 78% for WBTC, 80% for ETH, 83% for stETH. The threshold is always higher than the maximum loan-to-value (LTV) allowed at borrow time (70% on Zeeria) so there's a cushion between "cannot borrow more" and "will be liquidated".

Concretely, with 1 WBTC at $80,000 and $40,000 of USDC debt:

  • collateral USD = $80,000
  • collateral × LT = $80,000 × 0.75 = $60,000
  • debt USD = $40,000
  • health factor = $60,000 ÷ $40,000 = 1.50

That's comfortable. Now BTC drops to $60,000:

  • collateral × LT = $60,000 × 0.75 = $45,000
  • health factor = $45,000 ÷ $40,000 = 1.13 — caution territory

And at $55,000:

  • collateral × LT = $55,000 × 0.75 = $41,250
  • health factor = $41,250 ÷ $40,000 = 1.03 — about to liquidate

The shortcut: liquidation price

A more intuitive number is the BTC price at which your health factor crosses 1.0. Solving for that:

liquidation price = debt USD ÷ (collateral amount × liquidation threshold)

For our example: $40,000 ÷ (1 × 0.75) = $53,333. As long as BTC stays above $53,333, the position is safe. Below that, you're open to liquidation. This is the number Zeeria's UI shows directly: "Liquidates if BTC < $53,333".

What happens when you're liquidated

Liquidation is permissionless — anyone can call it as soon as your health factor drops below 1. On Zeeria the close factor is 50%, meaning a single liquidator can repay at most half your debt in one transaction. They get your collateral worth that debt plus a 5% bonus.

For our example position liquidating at $53,333 BTC:

  • Liquidator repays $20,000 of USDC debt (50% close factor).
  • Gets back $20,000 ÷ $53,333 ≈ 0.375 BTC + 5% bonus = ~0.394 BTC.
  • You keep ~0.606 BTC and have $20,000 of debt remaining.
  • Your new health factor = (0.606 × $53,333 × 0.75) ÷ $20,000 ≈ 1.21.

You're partially solvent again. If BTC continues to fall, the next liquidation can fire. The 5% bonus is your loss; the close factor is your only protection from being fully liquidated in one shot.

How fast does the health factor move?

For BTC ↔ USDC positions, the dominant variable is BTC price. Borrow interest accrues continuously but very slowly — a 5% APR borrow on $40k debt is $5.50/day, which barely moves the HF.

Price-driven HF changes are essentially linear with collateral price. A 10% BTC drop reduces a HF=1.5 position to HF=1.35. Going from HF=1.5 to HF=1.0 requires ~33% BTC drop. From HF=2.0 to HF=1.0 requires ~50%.

That linearity is what makes the liquidation price the most useful number to track — it's a fixed dollar level you can set a chart alert on.

Rules of thumb experienced borrowers use

  • Borrow no more than 50% LTV initially. That gives a starting HF of ~1.5 (with LT=75%) and headroom for a 33% BTC drop without action.
  • Set alerts at HF=1.5 and HF=1.2. The first is a heads-up; the second is a deadline to act. Zeeria sends both via email and Telegram (configure on /settings).
  • Have repayment liquidity ready. Keep idle USDC equal to ~30% of your debt available. If price drops fast you can repay rather than top up — repaying is faster on-chain than acquiring more BTC.
  • Never check on the weekend only. Crypto trades 24/7. If you can't act in <30 minutes, run an HF buffer of at least 2.0.
  • Don't chase yield by maxing borrow. A 70% LTV loan earning 5% APY in a yield strategy makes you a few hundred bucks a year on a $40k position. One liquidation costs you ~$1,800 in bonus + slippage. The math doesn't work.

Edge cases worth knowing

  • Health factor = ∞. When you have collateral but no debt, HF is mathematically infinite. The UI displays it as "∞" or "N/A". You cannot be liquidated with zero debt — there's nothing to liquidate.
  • Oracle price lag. Chainlink updates BTC/USD when the price moves more than a deviation threshold (typically 0.5%) OR every heartbeat (typically 1 hour or less). In a flash crash, the on-chain price may briefly lag the spot market — your HF on-chain looks healthier than reality. Most protocols implement a stale-price guard (Zeeria's rejects prices older than 4h).
  • Sequencer downtime on L2s. Base, Optimism, and Arbitrum have a single-sequencer model. If the sequencer goes down, no transactions can be included — including liquidations. Mature protocols use Chainlink's sequencer-uptime feed and pause liquidations during downtime + a grace period (Zeeria uses 1h). This protects you from being liquidated immediately after sequencer recovery on a stale price.

Related reading