Liquidation Risk Monitor
Monitor DeFi lending positions for liquidation risk. Get alerts before your collateral is liquidated on Aave v3, Compound v3, and other lending protocols.
What is a Liquidation Monitor?
A Liquidation Monitor tracks your lending positions and calculates the health factor. When the health factor drops below a safe threshold, you receive an alert to add collateral or repay debt.
Supported Protocols
- Aave v3: Ethereum, Polygon, Arbitrum, Optimism
- Compound v3: Ethereum, Polygon, Arbitrum
- Maker DAO: Ethereum (Vaults/CDPs)
Understanding Health Factor
Health Factor is calculated as:
Health Factor = (Collateral Value × Liquidation Threshold) / Borrowed Value
Example:
Collateral: 10 ETH × $2,000 = $20,000
Liquidation Threshold: 80%
Borrowed: $10,000 USDC
Health Factor = ($20,000 × 0.80) / $10,000 = 1.6Health Factor Ranges
| Health Factor | Status | Action |
|---|---|---|
| > 2.0 | ✅ Safe | No action needed |
| 1.5 - 2.0 | ⚠️ Caution | Monitor closely |
| 1.2 - 1.5 | 🟠 Warning | Add collateral soon |
| 1.05 - 1.2 | 🔴 Danger | Urgent action required |
| < 1.0 | 💥 Liquidation | Position liquidated |
Configuration
{
"type": "liquidation",
"name": "My Aave Position",
"chain": "ethereum",
"protocol": "aave-v3",
"walletAddress": "0x1234...5678",
"healthFactorThreshold": 1.5,
"alertLevels": [2.0, 1.5, 1.2, 1.05],
"interval": 300000
}Alert Examples
Health Factor Warning
⚠️ Liquidation Risk Warning
Protocol: Aave v3 (Ethereum)
Position: 0x1234...5678
Health Factor: 1.42 (was 1.68)
Status: Warning - Add collateral
Collateral: 10.5 ETH ($21,000)
Borrowed: $12,500 USDC
Liquidation Price: $1,190 per ETH
Actions:
1. Add 2 ETH collateral
2. Repay $2,500 USDC
3. Wait for price recovery
[View Position] [Add Collateral]Critical Alert
🚨 CRITICAL: Liquidation Imminent
Health Factor: 1.08
Liquidation in: ~$95 price drop
URGENT: Add collateral or repay debt NOW
[Emergency Actions]Use Cases
1. Prevent Personal Liquidations
Monitor: Personal Aave Position
Threshold: 1.5
Alert: Email + Telegram
Action: Manual intervention2. Automated Collateral Management
Monitor: Trading Bot Position
Threshold: 1.3
Webhook: https://bot.example.com/add-collateral
Action: Automated collateral addition3. Portfolio Risk Management
Monitor: Multiple positions
Alert Levels: 2.0, 1.5, 1.2
Dashboard: Track all positions
Action: Portfolio rebalancingBest Practices
1. Set Multiple Alert Levels
- Level 1 (HF 2.0): Information - Monitor
- Level 2 (HF 1.5): Warning - Plan action
- Level 3 (HF 1.2): Critical - Act now
- Level 4 (HF 1.05): Emergency - Immediate action
2. Check Every 5-15 Minutes
Crypto prices are volatile:
- 5 minutes: High-risk positions
- 10 minutes: Medium-risk positions
- 15 minutes: Conservative positions
3. Maintain Buffer
Don't wait until HF = 1.0:
- Alert at HF 1.5, not 1.1
- Account for gas fees
- Allow time to react
4. Have Emergency Plan
- Pre-approve token spending
- Keep collateral tokens liquid
- Set up flash loan backup
Troubleshooting
Health Factor Shows 0 or ∞
Causes:
- No borrowed amount (HF = ∞)
- Position doesn't exist
- RPC node error
Alerts Not Triggering
Solutions:
- Verify wallet address is correct
- Check protocol and chain match
- Ensure position exists on selected protocol