Health Factor
✦ Key Takeaways
- HF ≥ 1.0 — your position is safe, no liquidation possible
- HF < 1.0 — your position is liquidatable by anyone, instantly
- Target: keep above 1.2 — gives you buffer for price swings and interest accrual
- Cross-margin — all deposited positions contribute to one combined health factor
Formula
Health factor calculation
Health Factor = Σ(Position Value × Liquidation Threshold) / Total Debt
Where:
├── Position Value = shares × min(spotPrice, twapPrice)
├── Liquidation Threshold = tier-specific (55%, 70%, or 85%)
└── Total Debt = borrowed amount + accrued interest ⚠ The one rule that matters
If your health factor drops below 1.0, anyone can liquidate your position. There's no queue, no warning period, no grace. Everything else in risk management flows from this single threshold.
What Moves HF Down
Your health factor decreases when your collateral value drops or your debt increases. Five common causes:
| Cause | Effect | How fast |
|---|---|---|
| Position price drops | Collateral value ↓ | Immediate — tracks oracle price |
| Interest accrues | Debt ↑ | Continuous — compounds per-second |
| You withdraw collateral | Collateral value ↓ | Immediate — on transaction |
| Market approaches resolution | Early-closure factor reduces effective LTV | Gradual — linear decay over 7 days |
| Oracle becomes unavailable | That collateral = $0 borrow power | Immediate — after staleness window |
What Moves HF Up
You can actively improve your health factor through these actions:
| Action | Effect |
|---|---|
| Repay debt | Debt ↓ — most direct way to improve HF |
| Add collateral | Collateral value ↑ — deposit more PM positions |
| Position price rises | Collateral value ↑ — passive improvement |
HF Zones
Think of your health factor in four zones:
| Health Factor | Status | Recommended Action |
|---|---|---|
| > 1.5 | Safe | Monitor normally |
| 1.2 – 1.5 | Caution | Watch market moves closely |
| 1.0 – 1.2 | Warning | Consider repaying debt or adding collateral |
| < 1.0 | Liquidatable | Liquidation can happen at any moment |
💡 Buffer recommendation
Keep your health factor above 1.2 at minimum. This gives you margin for price swings, interest accrual, and early-closure decay. A sudden 15% price drop at HF 1.2 would bring you to ~1.02 — still safe but barely.
Worked Example
Let's walk through a concrete scenario showing how HF changes with market movements.
Starting position
Portfolio: $600 in Moderate tier (65% LTV / 70% liq threshold)
Debt: $300 USDC borrowed
Collateral value = $600 × 0.70 = $420 (using liq threshold)
Health Factor = $420 / $300 = 1.40 ✅ Safe After 20% price drop
Portfolio drops to: $480
Collateral value = $480 × 0.70 = $336
Health Factor = $336 / $300 = 1.12 ⚠️ Caution zone
→ You should consider repaying some debt or adding collateral. After another 10% drop
Portfolio drops to: $432
Collateral value = $432 × 0.70 = $302.40
Health Factor = $302.40 / $300 = 1.008 🚨 Danger!
→ One more small move and you're liquidatable.
→ Interest accrual alone could push you under 1.0. ℹ Monitor with the SDK
Use
readAccountSnapshot() from the TypeScript SDK to check your current health factor programmatically. Build alerts for when HF drops below your comfort threshold.