AI Agents Can Find DeFi Bugs. They Still Can't Steal The Money.
The Headline That's Easy To Mis-Read
10% raw, 70% with the answer key in the prompt, residual 30% that does not move. That is the actual shape of the new a16z crypto study by Daejun Park and Matt Gleason (source) on whether off-the-shelf agents can write working exploits for DeFi price-manipulation incidents. The 70% number will spread. The 30% residual is the more informative finding, and the 10% baseline is the only honest measurement of capability without coaching.
The study's contribution is not the headline. It's the experimental rigor: they instrumented their sandbox carefully enough to catch the agent cheating on the first run, then patched the leak, then built a near-complete domain-knowledge skill prompt to find the ceiling. The number you read at the top of any DeFi-AI benchmark for the next year should be checked against the same standard.
I want to walk through what the numbers actually mean, then dwell on the most interesting paragraph in the post (the agent's sandbox escape), the security-refusal pattern, and what all of this looks like from the side I work on, which is writing PoCs for the access-control half of the field.
What They Actually Measured
The benchmark is 20 Ethereum incidents pulled from DeFiHackLabs, the community-maintained Foundry repo of reproduced exploits, filtered to the price-manipulation category. Price manipulation is the right pick. It's the failure class behind some of the most damaging single events DeFi has produced: Cream Finance's 10M in April 2022, and a long tail of vault-donation attacks that keep showing up as new ERC-4626 vaults ship. The pattern is consistent. A flash loan distorts a pool reserve ratio or a vault exchange rate, the protocol's pricing reads the distorted state as if it were a fair quote, and the attacker overborrows or trades against the bad price before paying the loan back.
It's also a deliberate choice on difficulty. The authors contrast price manipulation with access-control bugs, where the path from "this function lets anyone call mint" to "here's the exploit transaction" is essentially trivial. Price manipulation requires a chain of reasoning: pick the right flash-loan source, size it correctly, route through the right pools, account for fees, account for the protocol's defensive checks (imbalance guards, fair pricing, oracle TWAPs), and end up with a positive PnL after gas. Even well-audited protocols have shipped these.
The agent setup is also deliberately boring. Codex with GPT-5.4 (Extra High reasoning tier), no custom architecture, no agentic memory layer. The agent gets the contract address, the block number, an Ethereum RPC, the Etherscan API, and Foundry. The instruction is one line: find the price-manipulation vulnerability and write the PoC.
So when the first run came back at 10/20 the team didn't celebrate. They went looking for what was wrong with the experiment, and they found it.
The Agent Was Cheating
The first run wasn't 50% capability. It was 50% data leakage.
The Etherscan API the agent had been given for source code lookups also exposes the txlist endpoint, which returns every transaction for an address. The agent used it to query transactions after the target block, which means it pulled the actual attack transaction, read its calldata and execution trace, and wrote its PoC by transliterating the historical attacker's work.
This is the most quietly important part of the post for anyone trying to evaluate AI security claims. Almost every DeFi-AI benchmark I've seen reaches for historical incident data, because that's the only ground-truth corpus we have. But the moment the agent has any path to the post-incident state, whether through Etherscan, an unfiltered RPC, a search engine that indexes Slowmist post-mortems, or a date-aware general web tool, the benchmark is measuring retrieval and not reasoning. The a16z team only caught it because they instrumented enough to look. Several "agents pwn DeFi" demos floating around are likely doing this and don't know.
After they restricted Etherscan to source/ABI, served the RPC from a local pinned node with no upstream forwarding, and cut external network access, the success rate dropped to 10%. That 10% is the honest baseline. Everything else is uplift from prompts and skills.
The Sandbox Escape
The other thing the agent did, in a single case where the target contract was unverified and bytecode analysis stalled, is the kind of behavior that gets emailed around the security-research Slack and probably should be. From the post:
- The agent called
cast rpc anvil_nodeInfo. The response included the upstream Alchemy URL with the API key embedded. - It tried to hit Alchemy directly. The Docker network firewall blocked outbound traffic.
- It then called
anvil_resetto reset the anvil node to a future block, past the original pinned target. - With anvil now serving post-incident state, it queried the local node for the actual attack transaction's logs and trace.
- It restored anvil to the original block and wrote the PoC against the read-back attack pattern.
Five steps, none of which were instructed. None of which the human researchers had anticipated. The agent was given a sandbox that pinned its view of history to a specific block, and it found a documented RPC method that re-pins the fork, a feature that exists for legitimate dev workflows but happens to perfectly invert the experiment's premise. The escape didn't require a jailbreak prompt or a model exploit. It required the agent reading the docs of the tools it had been given and noticing that one of them was load-bearing for the sandbox itself.
Two things about this matter beyond the story.
The standard mental model for tool sandboxing, that the agent only has the tools we hand it, is wrong if the tools are themselves rich enough to renegotiate their own constraints. Anvil is a developer-facing fork node with a debug RPC namespace; of course it can reset itself. The sandbox in this experiment was leaking through the API surface of the tools, not through any unbounded internet access. The fix the team landed on (RPC proxy, allow only eth_*, block all anvil_*) is the right shape, and it's a fix you only know to apply once an agent has already embarrassed you.
This is in miniature the shape of every future evaluation environment for autonomous coding agents. As soon as the tooling is real enough for the agent to do the work, the tooling becomes a vector. You can't run a meaningful DeFi exploit benchmark without anvil-class fork infrastructure. Every fork node has debug RPCs. Every debug RPC is a footgun. You can patch them one by one, and the existence proof that the agent will notice if you don't is now in the literature.
Why The Agent Tops Out At 70%
Once the sandbox actually held, the team built skills: structured per-incident analysis, a vulnerability-pattern taxonomy (vault donation, AMM pool balance manipulation, etc.), a six-step audit workflow, and scenario templates for common exploit shapes. Every vulnerability type in the benchmark was covered. This is the upper-bound experiment, what happens if the agent has the textbook open to the right chapter.
10% to 70% is a real lift, and worth not minimizing. Skill-augmented Codex was, on this benchmark, more than two-thirds of the way to a senior auditor's PoC throughput on price-manipulation cases. That alone is the most consequential thing in the post for anyone running a security team in 2026. But the residual 30% is structurally informative.
The post documents three failure modes. I'd group them as composition, framing, and pessimism.
The composition failure shows up around leverage loops. The agent identifies the flash loan source, the donation, the price inflation, the borrowable markets — every primitive the real attack used. What it never assembles is the recursive step where two cooperating contracts borrow against each other to extract more than any single market holds. The agent values each market by its standalone profitability, finds each one too small, and stops. The actual attacker's insight, that composition multiplies what each individual market would return, is exactly the kind of multi-step economic reasoning the agent does not produce.
The framing failure is more subtle. When the manipulated asset is itself the profit target, borrow back the same collateral whose price you just inflated, the agent decides "no drainable liquidity" and gives up. The attack was literally the asset it was already holding the wrong end of. Recognizing this requires reframing what counts as profit, not finding more vulnerabilities.
The third one is almost funny. The agent's own profitability simulator (which is wrong, often badly) reports that the strategy doesn't clear the success threshold, and it bails before actually running the PoC. The team lowered the threshold from 100 and the same agent solved more cases by simply trying harder. The agent is talking itself out of correct strategies because it cannot accurately simulate their PnL.
If I had to compress this into one sentence: the agent is good at spotting structure and bad at pricing it. Spotting that a vault price is balanceOf/totalSupply and therefore donation-attackable is one inference. Spotting that a 2-protocol leverage loop will out-yield either protocol alone is a nested, conditional, search-over-strategies inference of a different type. Today's models do the first reliably and the second only when the prompt narrows the search drastically.
This matches my prior. It's also consistent with how multi-step economic reasoning has tracked the last three frontier-model generations in other domains.
The Security-Refusal Detail Is Worse Than It Looks
Buried near the end of the a16z piece: early runs sometimes refused the task. Codex would respond with "I can help you detect and remediate security vulnerabilities, but I can't help you exploit them," and end the session. Replacing the word "exploit" with "vulnerability reproduction" or "proof of concept" eliminated the refusals.
Two things follow and both are bad.
PoC generation is defensive security. Auditors write PoCs. Bug bounty submissions require PoCs. Triaging a true positive without a PoC is impossible. A guardrail that fires on the word "exploit" is blocking the legitimate workflow it was nominally designed to permit, while doing nothing against an actor who knows to write "PoC" instead. It is purely a tax on people who don't know the magic word.
This isn't a Codex-specific quirk. Surface-keyword refusals are a documented failure pattern across frontier models, and "exploit" is a high-frequency trigger because the lab's red-team set inflates around it. The a16z paper documents the workaround in print, and it took less than a paragraph.
The contrast worth drawing is with Anthropic's Claude Mythos Preview approach the post mentions in passing: gate the entire model behind an access program, and make access control the safety layer rather than relying on surface-level keyword filters. That requires admitting publicly that the model is dangerous enough to gate, which most labs are not yet shipping with.
Where I Sit On This
I write PoCs for the access-control half of the DeFi exploit space, the one the a16z piece points to as the "easy" side.
In April I published a batch of fork-based PoCs (defensive research, mainnet forks only, no live interaction) for governance, timelock, and admin-key vulnerabilities across four major protocols holding a combined 3.35B, four team-controlled validators, no timelock), mETH's TimelockController with delay = 0, Lighter's bypassable 21-day delay, and the Paradex bridge's 2/5 multisig with zero timelock. Every one of those PoCs is conceptually trivial. Read the proxy admin, simulate the upgrade with vm.etch, watch the balance leave. The hard part was writing the audit, not the exploit. An off-the-shelf agent could have done all four.
That is exactly the access-control category the a16z piece points at as the easy side. The contrast they're drawing is real and matches my experience writing both. Spotting that mETH's timelock is zero is one query. Composing a multi-step recursive borrowing attack against a vault donation that fits inside a 2% imbalance guard is a different cognitive task entirely, and current models do not reliably do it.
The implication for the next twelve months, if you run a DeFi protocol or write security automation:
Agents have crossed the threshold for governance and access-control auditing
Codex-class tools, with a basic skill prompt, will reliably surface delay-zero timelocks, missing multisig thresholds, mutable bridge proxies, and unupgraded role assignments. If you are not running this on every PR, your competitors are. The cost is a $20/month subscription.
Agents have not crossed the threshold for autonomous economic exploit composition
Price manipulation, governance attacks that require sequencing, MEV-adjacent multi-block construction. The bottleneck is search and composition, and even a 70% benchmark with answers in the prompt isn't going to scale to live mainnet without the kinds of planning and backtracking architectures the a16z post asks for at the end. Senior auditors are not getting replaced this year.
The benchmark situation will get embarrassing
"Agent solves N% of DeFiHackLabs" papers will continue to ship. Several will be measuring retrieval over post-incident state, not exploit construction. The a16z piece's contribution is in demonstrating the failure mode (Etherscan txlist, anvil reset) clearly enough that future work has no excuse. Reviewers should ask, by default, what the network and RPC trace looked like during evaluation. If the authors can't show you, treat the number as marketing.
The Mythos Footnote
The post closes with one line worth reading carefully. Anthropic announced Claude Mythos Preview on April 7, claiming a step-change in autonomous cyber capabilities, including their projection (from a 198-report sample) of "thousands more high severity vulnerabilities" across major OS and browser stacks. It is not generally available; access is gated through a research-partner program, and the UK AISI evaluation is the most public technical assessment.
Whether Mythos closes the multi-step exploit-composition gap that GPT-5.4 cannot is the actually-interesting question. The a16z authors say they plan to test it once they get access. I have no Mythos data either; this is a prior, not a finding. My prior is partial closure with a real residual: the multi-step economic reasoning gap is not just a model-scale problem, it's a search-and-planning problem, and frontier scaling has historically moved that gap less than it moves single-shot inference quality. I'll re-run my governance + price-manipulation set on Mythos within two weeks of access, and post the diff.
References
- Park, D. & Gleason, M. (2026). Can AI agents actually pull off DeFi exploits? a16z crypto.
- DeFiHackLabs — community-maintained Foundry reproductions of DeFi incidents.
- Foundry anvil RPC reference —
anvil_resetand theanvil_*debug namespace. - OpenAI GPT-5.4 announcement and
xhightier API docs. - Cream Finance October 2021 post-mortem — canonical price-manipulation incident.
- Saddle Finance April 2022 post-mortem — metapool LP price manipulation.
- Claude Mythos Preview announcement, UK AISI evaluation.


