Health Factor Calculator
Simulate your lending position risk across DeFi protocols
What is Health Factor?
Health Factor (HF) measures how safe your lending position is from liquidation. It is calculated as:
HF = (Collateral Value × Liquidation Threshold) / Total Debt - HF > 2.0 — Safe. Your position has a large buffer before liquidation.
- HF 1.2–2.0 — Moderate risk. A significant price drop could bring you close to liquidation.
- HF < 1.2 — High risk. A small price movement could trigger liquidation.
- HF = 1.0 — Liquidation threshold. The protocol can start liquidating your collateral.
How to Use This Calculator
- Select a protocol (Aave V3 or Spark) and chain.
- Choose your collateral asset and enter the amount deposited.
- Select the asset you are borrowing and enter your debt amount.
- The calculator fetches real-time LTV and liquidation thresholds from on-chain data to compute your health factor.
Adjust the collateral or debt values to simulate scenarios — for example, what happens to your HF if the collateral price drops 30%, or if you borrow an additional $5,000.
Health Factor by Protocol
Not all DeFi lending protocols measure position risk the same way. While Aave V3, Spark, and Morpho Blue use a health factor model, Compound V3 takes a different approach based on utilization percentage and a binary liquidation flag. Here is how they compare:
| Feature | Aave V3 | Spark | Compound V3 | Morpho Blue |
|---|---|---|---|---|
| Model | Pooled lending | Pooled (Aave fork) | Isolated (Comet) | Isolated pairs |
| Risk Metric | Health Factor | Health Factor | Utilization % | Health Factor |
| Liquidation Trigger | HF < 1.0 | HF < 1.0 | isLiquidatable | HF < 1.0 |
| Liquidation Penalty | 5–10% | 5–10% | 5–10% | Variable per market |
| E-Mode | Yes (correlated pairs) | Yes | No | N/A (isolated by design) |
| Typical Safe Level | HF > 2.0 | HF > 2.0 | < 80% utilization | HF > 2.0 |
Note on Compound V3: Unlike the other protocols listed here, Compound V3 does not expose a health factor number. Instead, it tracks how much of your borrowing capacity you have used (utilization %) and sets a boolean isLiquidatable flag when your position exceeds its borrow limit. To monitor Compound V3 positions, focus on keeping your utilization well below 100% rather than targeting a specific HF value.
Tips to Maintain a Safe Health Factor
Keeping your health factor well above the liquidation threshold is the single most important habit for long-term DeFi lending. A target of HF > 2.0 gives you a meaningful buffer against sudden market moves — during volatile market events, positions with thin margins can be liquidated within minutes as oracle prices update.
- ● Buffer for volatility: Aim for HF above 2.0. During high-volatility events like ETH flash crashes or liquidation cascades, even positions at HF 1.5 can be wiped out before you have time to react.
- ● Stablecoin collateral: Using stablecoins (USDC, DAI) as collateral significantly reduces your liquidation risk since their price rarely deviates from $1. This lets you safely operate at a lower HF compared to volatile collateral like ETH or WBTC.
- ● Automated monitoring: Set up alerts that notify you when your HF drops below a threshold (e.g., 1.5). Tools like DeFi Monitor can send Telegram or Discord alerts so you can act before liquidation happens.
- ● E-Mode for correlated pairs: If you are borrowing against correlated assets (e.g., stETH as collateral, ETH as debt), enable E-Mode on Aave V3 or Spark. This raises the liquidation threshold to ~93%, letting you borrow more while keeping risk low since both assets move together.
- ● Diversify collateral: Spreading your collateral across multiple asset types reduces the chance of a single price drop triggering liquidation. A portfolio of ETH, WBTC, and stablecoins is more resilient than a single-asset position.
- ● Watch gas prices: During network congestion, gas spikes can delay your repayment transaction. If you wait until HF is dangerously low and then cannot get your transaction confirmed in time, liquidation bots — which use aggressive gas strategies — will liquidate you first.