checkHealthFactor
Monitor a wallet's health factor against a threshold and receive alert levels from safe to critical. Returns alert:true when below threshold, enabling automated repay or supply actions in agent monitoring loops.
Instructions
Check a wallet's health factor against a threshold. Returns alert:true if HF is below threshold. Use in agent monitoring loops: call on a cron interval and trigger repay() or supply() when alert:true. Alert levels: safe | warning (below threshold) | danger (HF < 1.2) | critical (HF < 1.05, liquidation imminent).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Wallet address (0x...) to monitor | |
| threshold | No | Health factor threshold to alert below. Default: 1.5. Must be between 1.0 and 10.0. |