Understanding Coinbase’s x402 and Ethereum’s ERC-8004

Once upon a time, blockchains simply functioned as ledgers for recording token transfers, but they are now required to do a lot of things. Especially now that AI has arrived onchain, bringing with it an army of agents seeking to automate, interact, and coordinate.

In today’s onchain landscape, software agents – not just humans – are interacting with smart contracts. As a result of this agentic activity, better information-handling standards are required to ensure that data is not only fast and verifiable, but machine-readable by default.

This is where two new onchain standards – x402 and ERC-8004 – come into play. Each standard has the ability to make blockchains function far more efficiently for transaction-executing agents. Both standards have a pivotal role to play in maintaining a scaled agentic economy which is why The Graph is supporting their global adoption. Here’s why x402 and ERC-8004 matter, and why The Graph is offering each full support.

Understanding ERC-8004 and x402

Imagine you’re going for a night out with friends. Before leaving the house, the essentials you’ll slip into your pocket will include your smartphone and ID. The ID card ensures you’re served at the bar by verifying your age, while the smartphone allows you to pay at the bar using contactless.

  • ERC-8004 is the ID for AI agents. It handles onchain identity and reputation, enabling them to get served at the bar.
  • x402 is the smartphone that allows agents to buy a round of drinks at the bar. Or to be more precise, that allows agents to pay other agents without a human in the loop.

Even if you’ve faded AI agents up until now, if you’re reading this you probably understand why they’re such a big deal. You may also have an idea as to why they’ve yet to fully take off.

The ability to automate onchain activity, not just on one blockchain but across the entire omnichain landscape, is huge. Whether you’re into yield farming, trading, prediction markets, or gaming, an agentic economy that works as one will put an end to the drudgery of manually bridging, approving transactions, dealing with gas fees and all the rest.

Just as importantly, this won’t just save you time but will also save your precious money. An AI agent that can rebalance your portfolio and trade for you 24/7 can hustle harder than any human. But for this vision to come to pass, agents need to be able to work as one.

This entails collaborating, exchanging payments, checking each other’s reputations, paying for data or compute power, and executing tasks across multiple chains. This complexity accounts for why the average blockchain user has yet to outsource all their decision-making to agents: unfortunately, the industry has yet to settle on a single framework to facilitate this. But ERC-8004 and x402 are the puzzle pieces needed to complete the picture.

ERC-8004: The Agent’s Passport

ERC-8004 is the reputation solution AI requires. This Ethereum standard gives agents a verifiable onchain identity and is not limited to providing agents with a name tag.

ERC-8004 includes registries for Reputation (a track record of past behavior) and Validation (proof that they executed a task correctly) as well. This transforms AI agents from black boxes into transparent digital actors that can be hired by humans or other agents.

x402: The Agent’s Wallet

The original architects of the internet anticipated a need for digital payments and reserved the HTTP error code 402 for “Payment Required.” For decades, this code sat unused. x402 revives this standard to create a payment rail native to the web. In layman’s terms, x402 allows an AI agent to surf the web and instantly pay for what it uses, whether that’s accessing a database or asking another AI for help.

Unlike human payments, which involve credit card forms and monthly subscriptions, x402 enables micro-payments. An agent can pay a fraction of a cent for a single piece of data instantly and autonomously. It forms a low-friction commerce layer that allows machines to exchange resources within defined rules and controls.

The Graph as Data Layer

While x402 provides the wallet and ERC-8004 provides the ID, an AI agent is effectively blind without data. To make decisions, be it verifying identities or executing trades, an agent needs structured, reliable information. This is where products developed by The Graph come into play.

Just as humans rely on search engines to navigate the web, AI agents and humans alike rely on The Graph to navigate blockchains. Without indexing, blockchain data is a messy, disorganized stream of unrelated blocks. The Graph organizes onchain data into open APIs (aka Subgraphs), turning raw chaos into a structured library that AI agents can query in milliseconds.

As an ecosystem backer for the new ERC-8004 standard, The Graph is ensuring that the agent economy has the data infrastructure it needs to scale. For ERC-8004 to work, agents need to constantly check the registries. Is this agent valid? What is its reputation score? Has it been flagged for bad behavior?

If every agent had to scan the blockchain in its rawest form to answer these questions, the network would grind to a halt. Instead, The Graph is publishing and maintaining dedicated ERC-8004 Subgraphs. These Subgraphs index the Identity, Reputation, and Validation registries across eight different popular blockchains.

In simple terms, this means an AI agent operating on Base can instantly verify the reputation of an agent on Arbitrum by simply querying a Subgraph. It creates a unified, cross-chain directory of trust.

Web3 developers and Agents can already use The Graph’s network to fetch ERC-8004 data! In partnership with Agent0, a project by the ERC-8004 authors, The Graph Foundation and BuildersDAO are building the canonical APIs for ERC-8004 data, served in a decentralized fashion on The Graph. Find the Subgraphs here, or take a look at Agent0’s docs.

That covers The Graph’s handling of ERC-8004.

So what about x402?

GraphTally for x402

While The Graph specializes in serving data, it also plays a role in how that data is monetized using x402. As it stands, x402 has a few drawbacks when applied in a blockchain context, not least the “gas problem” whereby if an agent pays $0.0001 for a data query but the network transaction fee is $0.05, the economics fail.

GraphTally, the trust-minimized micropayment system developed by core developers of The Graph, has been live on the network since the end of 2024. Inspired by this solution, core developers have also contributed to the x402 specification, introducing the same principles as GraphTally and, thus, making x402 more suitable for use cases that demand microtransactions.

Instead of settling every single micro-transaction onchain immediately, GraphTally allows agents to issue cryptographically signed “vouchers” for each request that are aggregated and settled onchain in a single batch transaction later.

Think of it as a “buy now, pay later” deal, allowing agents to get to work without being sidelined by the vagaries of network gas fees. This innovation enables agents to make thousands of queries per minute without being bottlenecked by gas fees. Agents, meanwhile, can now pay for Subgraphs using the x402 standard. Currently, an Agent is available that accepts requests in natural language from other agents and passes them to The Graph Network via GraphQL using an MCP. Full x402 Subgraph Gateway compatibility is in development.

This effectively transforms The Graph from a protocol optimized for one specific approach to indexing blockchain data into a data marketplace. An agent can use x402 to pay for a Subgraph query, process that data, and then sell the result to another agent, all orchestrated via The Graph’s infrastructure.

Twin Standards That Unify Web3

In securing the data layer for ERC-8004 and pioneering scalable payments with GraphTally, The Graph is making the AI economy a working reality. Up until now, agents could get into the club but they couldn’t get served because they’d left their smartphone and ID at home. Now, thanks to ERC-8004 and x402, they can verify their identity and purchase a round of drinks for all their fellow agent friends. If these twin standards make the agent economy possible, The Graph is the data layer that makes it achievable.

About The Graph

The Graph  is the leading indexing and query protocol powering the decentralized internet. Since launching in 2018, it has empowered tens of thousands of developers to effortlessly build  Subgraphs  and leverage  Substreams  across countless blockchains, including Ethereum, Solana, Arbitrum, Optimism, Base, Polygon, Celo, Soneium, and Avalanche. With powerful tools like Substreams and Token API, The Graph delivers high-performance, real-time access to onchain data. From low-latency indexing to rapid token data, it serves as the premier solution for building composable, data drive dapps.

Discover more about how The Graph is shaping the future of decentralized physical infrastructure networks (DePIN) and stay connected with the community. Follow The Graph on  X LinkedIn Instagram Facebook Reddit Farcaster  and  Medium. Join the community on The Graph’s  Telegram, join technical discussions on The Graph’s  Discord.

The Graph Foundation  oversees The Graph Network.  Edge & Node StreamingFast Semiotic Labs GraphOps and  Pinax  are five of the many organizations within The Graph ecosystem.


Categories
RecommendedDeveloper Corner
Published
February 5, 2026

The Graph Foundation

View all blog posts