| Health factor | Status |
|---|---|
| HF ≥ 1.5 | Safe |
| 1.1 ≤ HF < 1.5 | Caution |
| 1.0 < HF < 1.1 | Approaching liquidation |
| HF < 1.0 | Liquidatable |
Inputs (all read live from mainnet)
Collateral & debt
Per-reserve balances from
get-user-reserve-data and the aToken balance.Liquidation threshold
From
get-reserve-state — e.g. sBTC = 0.75 (75%).Oracle price
From the reserve’s on-chain oracle — e.g.
stx-btc-oracle-v1-4.Decimals
Per-asset fixed-point scaling from
get-reserve-state.Worked example
A position with 0.5 sBTC collateral and 64,472 and a liquidation threshold of 0.75:1.0 and the position becomes liquidatable. Sonar alerts well before that point.