Protocol Agent-Readiness
AI agents are about to be the heaviest users of DeFi protocols. Before they arrive, a protocol can find out how they will fare. We take its contracts (an address on Base or Ethereum, with its ABI from Sourcify), generate the user flows an agent would attempt (swap, deposit, withdraw, borrow, repay) from the ABI with deterministic templates, and run a battery of scripted agents through them on an Anvil fork at a recent block: a careful one, a naive one, and adversarial ones (max-approve, slippage-insensitive, re-entrancy probe, sandwich-prone). Success is read from chain state, never from what an agent says. The result is an Agent Readiness Score, findings with concrete fixes and reproducible traces, with the report hash attested on Ethereum Sepolia.
Everything runs on a local fork: no transaction is sent to any real network and no real funds are used. The agents are scripts, not language models (an LLM follow-up is queued separately). This is a measurement of agent-facing interface quality at one block, not a security audit. Methodology: /docs/methodology/protocol-readiness · API: POST /v1/protocol-audits, GET /v1/protocol-audits/:id.
Case studies
B83/100
1 high1 medium4 low2 info
Base fork at block 52676275 · 5/5 flows · 50 cases
attested on Sepolia EAS
B80/100
1 high3 medium6 low1 info
Base fork at block 52676196 · 2/2 flows · 34 cases
attested on Sepolia EAS
Published, unedited runs against the live contracts as they were at the stated block. Karatum is not affiliated with the protocols tested. A grade orders protocols by how their agent-facing interface fares under this battery; it is not a statement about the protocol's security or economics.
What the battery does
| Measured | How |
|---|---|
| Task completion (30) | A careful agent (exact approval, simulation, 0.5% output bound, 20-minute deadline, on-chain verification) performs each generated flow; success is checked from balances and positions. |
| Safety for a naive agent (25) | An attacker moves the pool price about 1% against a trade before it lands; a bound-less agent's loss against the careful baseline is measured. The careful agent's own bound turns the same move into a revert. |
| Input hardening (15) | Zero amount, one base unit, zero-address recipient, missing approval, amount above balance, past deadline, impossible minimum output, input token with no code. |
| Error legibility (10) | Every revert is decoded against the published ABI: named custom errors score highest, short codes and selectors missing from the ABI lowest. |
| Approval surface (10) | Whether exact approvals suffice, who the spender is (upgradeable proxy?), signature-accepting functions, allowance left behind by each agent. |
| Interface clarity (10) | Static ABI analysis: missing minimum-output and deadline parameters, overloads (including opaque packed ones), unnamed parameters, wide structs, dual assets/shares inputs. |
Run it on your protocol
Self-serve and free during the testnet phase, rate-limited (3 per minute and 6 per day anonymously) and queued: audits run one at a time on a fork. Reports are unlisted by default; the link with the view token shown once is the only way to open one. Choose public to make the report readable by its id.
curl -s https://api.karatum.com/v1/protocol-audits -H 'content-type: application/json' -d '{
"visibility": "unlisted",
"config": {
"name": "My AMM", "chainId": 8453,
"contracts": [{ "name": "Router", "address": "0x…" }],
"flows": [{ "kind": "swap", "contract": "Router", "token": "USDC", "tokenOut": "WETH", "amount": "1000" }]
}
}'
# -> 202 { id, viewToken (shown once), urls } then: GET /v1/protocol-audits/:id?token=…