Agents that pay themselves: ERC-8004 in production
We've been building agent marketplaces on Base for a year. Here's what actually works when an autonomous agent has a wallet and a credit card.
On-chain agents are no longer a thought experiment. They sign transactions, hold USDC, and call other agents — and the failure modes are very different from a normal SaaS bug.
ERC-8004 gives us an attestation primitive: who made the agent, what it claims to do, and what it has actually done. Marketplaces use it as the unit of trust.
The hard part is not the contract — it is the runtime. An agent that crashes mid-task and has already paid for a tool call is a real loss. We use a journal pattern: every action is appended before it is executed, and a recovery worker resumes work from the last known good entry.
Costs add up fast. A single agent that does ten tool calls and three on-chain writes per task can burn through dollars per run if you do not batch. We batch reads aggressively and bundle writes via a paymaster.
Above all: log everything, and replay it. The team that can reproduce yesterday's agent run from a single trace ID ships the most reliable system.