Actionable Risk Intelligence for DeFi Lending Protocols
Abstract
Decentralized Finance (DeFi) lending protocols like Aave V3 rely on over-collateralization to secure loans, yet users frequently face liquidation due to volatile market conditions. Existing risk management tools utilize static health-factor thresholds, which react to current collateral and debt conditions rather than forecasting how liquidation risk develops. In this work, we propose an autonomous agent that leverages time-to-event (survival) analysis to move beyond prediction to execution. The agent uses survival-based risk signals to select candidate interventions, and we evaluate their counterfactual outcomes in protocol-aware simulation. We introduce a return period metric derived from a numerically stable XGBoost Cox proportional hazards model to normalize risk across transaction types, coupled with a volatility-adjusted trend score to filter transient market noise. To select optimal interventions, we implement a counterfactual optimization loop evaluated within a high-fidelity Aave V3 simulator. The simulation combines reserve-index accrual, historical price paths, and reconstructed wallet constraints to evaluate candidate interventions. We compare the agent with four fixed rule-based baselines (static HF-buffer, repay-only, deposit-only, and automation-style) and a tuned rule-based bot calibrated by Bayesian optimization on earlier training-period data. All five baselines are evaluated on matched cases from the main evaluation cohort and a separate shortest-time-to-liquidation stress test. In the main cohort, the agent prevented 76.4β79.3% of simulated liquidations, compared with 49.8β50.2% for the tuned rule-based bot, and outperformed every fixed policy. In the separate 30-day stress test, the agent prevents 95.5β98.5% of simulated liquidations. No matched agent case worsens in either cohort.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.