A new study from a16z crypto delivers a sobering verdict on the state of automated DeFi security: AI agents are getting good at spotting exploits — but they're still lousy at fixing them before the damage is done. The research, released this week, finds that while machine learning models can identify malicious transactions in real time, executing a successful remediation — like pausing a contract or draining a vulnerable vault — remains a major bottleneck. The authors argue the gap is more than a technical glitch; it's an urgent security risk that adversaries could exploit.
The detection-remediation gap
The study tested several AI agent architectures against a range of common DeFi exploit scenarios, from flash loan attacks to oracle manipulation. Detection rates were high — agents flagged suspicious activity in the vast majority of cases. But when it came to stopping the exploit, performance fell off sharply. The agents struggled to pick the right remediation action from a menu of options, and they often failed to execute the action fast enough to beat the attacker.
That lag matters. In DeFi, a few seconds can mean millions of dollars lost. The researchers note that current containment protocols are simply not robust enough to bridge the gap between detection and response.
Why remediation is so hard
Part of the problem is that stopping an exploit isn't a one-size-fits-all action. An agent has to weigh trade-offs: pausing a contract might halt the attack, but it also locks up legitimate user funds. Draining assets into a safe vault could work, but it requires precise logic and trust assumptions. The study found that agents often chose actions that were too aggressive or too timid, and they lacked a reliable feedback loop to adjust mid-attack.
The authors emphasize that the issue isn't just technical — it's also strategic. If malicious actors deploy their own AI agents that can mimic the detection models and anticipate the likely remediation, they could craft attacks that slip through the gaps. That adversarial misuse scenario is a central concern in the paper.
What the study calls for
The a16z crypto team is pushing for the development of robust containment protocols — standardized, battle-tested procedures that AI agents can execute reliably. They argue the industry needs to treat the remediation problem with the same seriousness it has given detection. Without that, automated security systems risk becoming a false comfort.
The study lands at a time when DeFi protocols are under constant pressure from exploiters. Automated defenses are widely seen as the next frontier, but this research suggests the frontier is still a long way from safe.




