ERC-8118: A Standard for Authenticating and Authorizing On-Chain Agents


Title: ERC-8118: A Standard for Authenticating and Authorizing On-Chain Agents

Authors: Matrixlabs
Resources Required: Space to demo the On-Chain Agents

:brain: What do you suggest?

As bots and AI agents become first-class actors on-chain, we need a standard way to authenticate and authorize them. ERC-8118 defines how agents prove consent and receive scoped permissions—without taking custody of user keys.


:bullseye: Motivation & Rationale

Autonomous agents—trading bots, AI assistants, game NPCs, DeFi keepers—are becoming essential on-chain actors. But how do we authenticate them? How do we authorize what they can do? Today’s options either require full key custody or force users into smart wallet migration. ERC-8118 addresses this gap with a standard authentication and authorization layer for agents acting on behalf of EOAs. Agents cryptographically sign consent to prove they accept the delegation. Principals define exactly which functions agents can call, with time bounds and usage limits. Revocation is immediate and verifiable. We’ll walk through the agent authentication flow, explain the mutual consent model that prevents unauthorized binding, and explore authorization patterns for real use cases: trading agents limited to swap functions, gaming agents that play while you’re offline, DeFi agents that manage positions within bounds, and DAO agents with time-boxed execution rights. We’ll compare with ERC-4337 and EIP-7702 to clarify complementary roles. Insights drawn from production deployment and peer-reviewed research at BRAINS 2025.


:hammer_and_wrench: Implementation

Attendees will gain a clear framework for thinking about agent authentication and authorization on-chain. You’ll understand the mutual consent model, learn how to scope agent permissions for different use cases (trading, gaming, DeFi, DAOs), and see how ERC-8118 complements smart account standards. Whether you’re building agent infrastructure, integrating autonomous services into dApps, or designing secure delegation flows, you’ll leave with practical patterns and security considerations.

The gap that ERC-8118 is aiming for is genuine. The mutual consent approach is the main winner here; it eliminates many of the issues with key possession and quiet delegation that we now see with bots by requiring the agent to sign an acceptance.

Oversimplified scopes provide a significant danger. Serious DeFi agents will need constraint-based restrictions (value caps, slippage, and health considerations) or individuals will construct dangerous reasoning around the standard. Function-level permissions won’t be sufficient.

It’s also important to note that ERC-8118 enhances ERC-4337 rather than replaces it. For EOAs that aren’t yet smart accounts, this seems to be the missing delegation layer.

ERC-8118 may end up becoming the default agent auth pattern on-chain if revocation is resilient in the event of a mempool race.