Overview
This agent skill monitors a user’s credit position and takes autonomous action to keep it healthy:- Repays debt before the billing cycle ends to avoid the 15% overdue APR
- Tops up collateral if the health factor drops below a safe threshold
- Alerts on critical health factor levels
API Endpoints Used
How It Works
1
Poll Position Health
The agent periodically checks the user’s credit position:The agent extracts three signals:
healthFactor, principal + interest (total debt), and dueDate.2
Evaluate & Decide
The agent applies rules to decide what action to take:
3
Execute
- Auto-Repay
- Top Up Collateral
When the due date is approaching, the agent repays the full outstanding balance:The
amount is principal + interest in USDC lowest denomination (6 decimals). $2,012.50 = 2012500000.Returns { calls: ContractCall[] } — execute via the delegated signer.Implementation
Configuration
Poll Interval
Poll Interval
Default: every 5 minutes. Increase for lower API usage, decrease if positions are volatile. For most users, 5–15 minutes is sufficient.
Health Factor Threshold
Health Factor Threshold
Default: 1.3. The agent tops up collateral when health factor drops below this. See Risk Management for liquidation thresholds — positions below 1.0 are liquidatable.
Repayment Timing
Repayment Timing
Default: 3 days before due date. Repaying early avoids the 15% overdue APR that kicks in after the billing cycle ends.
Related
Credit Engine
Health factor, LTVs, and liquidation mechanics.
Risk Management
Collateral tiers and concentration limits.
Credit API Reference
Full account info endpoint with interactive playground.