zest-auto-repay
What it does
Autonomous LTV guardian for Zest Protocol v2 borrowing positions on Stacks. Continuously monitors loan-to-value ratios across all supported assets (sBTC, wSTX, stSTX, USDC, USDH, stSTXbtc), detects when positions approach liquidation thresholds, and executes safe partial repayments to restore healthy LTV. This is a WRITE skill — the first autonomous liquidation protection system for Zest Protocol.
Why agents need it
Zest Protocol liquidates borrowers when LTV exceeds ~85% (partial) or ~95% (full). Liquidation penalties destroy collateral value. Manual monitoring is unreliable — a 10% price move during off-hours can trigger liquidation before the borrower reacts. This skill gives agents the ability to:
- Detect risk — continuously monitor LTV across all Zest positions
- Classify urgency — score positions as healthy, warning, critical, or emergency
- Compute safe repayments — calculate minimum repayment to restore target LTV
- Execute protection — repay debt automatically with enforced spend caps
- Preserve reserves — never repay below minimum wallet reserve threshold
Without this, leveraged Zest positions are exposed to unmonitored liquidation risk 24/7.