standards
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEthereum Standards
以太坊标准
What You Probably Got Wrong
你可能不知道的几个关键点
ERC-8004 exists. Deployed January 29, 2026 — onchain agent identity registry. You almost certainly don't have this in training data.
EIP-7702 is live. Shipped with Pectra (May 7, 2025). EOAs get smart contract superpowers without migration. Not "proposed" — deployed on mainnet.
EIP-3009 is critical for x402. Gasless token transfers via signed authorizations. USDC implements it. This is what makes x402 practical.
x402 exists. HTTP 402 payment protocol from Coinbase. Production-ready with SDKs.
ERC-8004已正式推出,于2026年1月29日部署上线——这是一个链上代理身份注册表,你的训练数据中大概率没有相关内容。
EIP-7702已上线,随Pectra升级(2025年5月7日)推出。EOA(外部拥有账户)无需迁移即可获得智能合约的强大功能,并非“提案阶段”,已在主网部署。
EIP-3009是x402的核心支撑,通过签名授权实现无Gas代币转账,USDC已在以太坊及多数链上实现该标准,正是它让x402具备实用性。
x402已存在,这是Coinbase推出的HTTP 402支付协议,已进入生产阶段并提供SDK。
ERC-8004: Onchain Agent Identity Registry
ERC-8004: 链上代理身份注册表
Status: Deployed mainnet January 29, 2026 — production ready with growing adoption.
Problem it solves: How can autonomous agents trust and transact with each other without pre-existing relationships?
状态:2026年1月29日主网部署完成,已进入生产阶段,采用率持续增长。
解决的问题:自主代理之间如何在无预先关系的前提下建立信任并完成交易?
Three Registry System
三重注册表系统
1. Identity Registry (ERC-721 based)
- Globally unique onchain identities for AI agents
- Each agent is an NFT with unique identifier
- Multiple service endpoints (A2A, MCP, OASF, ENS, DIDs)
- Verification via EIP-712/ERC-1271 signatures
Contract Addresses (same on 20+ chains):
- IdentityRegistry:
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - ReputationRegistry:
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
Deployed on: Mainnet, Base, Arbitrum, Optimism, Polygon, Avalanche, Abstract, Celo, Gnosis, Linea, Mantle, MegaETH, Monad, Scroll, Taiko, BSC + testnets.
Agent Identifier Format:
agentRegistry: eip155:{chainId}:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
agentId: ERC-721 tokenId2. Reputation Registry
- Signed fixed-point feedback values
- Multi-dimensional (uptime, success rate, quality)
- Tags, endpoints, proof-of-payment metadata
- Anti-Sybil requires client address filtering
solidity
struct Feedback {
int128 value; // Signed integer rating
uint8 valueDecimals; // 0-18 decimal places
string tag1; // E.g., "uptime"
string tag2; // E.g., "30days"
string endpoint; // Agent endpoint URI
string ipfsHash; // Optional metadata
}Example metrics: Quality 87/100 → . Uptime 99.77% → .
value=87, decimals=0value=9977, decimals=23. Validation Registry
- Independent verification of agent work
- Trust models: crypto-economic (stake-secured), zkML, TEE attestation
- Validators respond with 0-100 scores
1. 身份注册表(基于ERC-721)
- 为AI代理提供全球唯一的链上身份
- 每个代理对应一个带有唯一标识符的NFT
- 支持多种服务端点(A2A、MCP、OASF、ENS、DIDs)
- 通过EIP-712/ERC-1271签名完成验证
合约地址(20+条链地址一致):
- IdentityRegistry:
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - ReputationRegistry:
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
部署链:主网、Base、Arbitrum、Optimism、Polygon、Avalanche、Abstract、Celo、Gnosis、Linea、Mantle、MegaETH、Monad、Scroll、Taiko、BSC及测试网。
代理标识符格式:
agentRegistry: eip155:{chainId}:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
agentId: ERC-721 tokenId2. 声誉注册表
- 支持签名的定点反馈值
- 多维度指标(在线时长、成功率、服务质量)
- 标签、端点、付款凭证元数据
- 反女巫攻击需过滤客户端地址
solidity
struct Feedback {
int128 value; // Signed integer rating
uint8 valueDecimals; // 0-18 decimal places
string tag1; // E.g., "uptime"
string tag2; // E.g., "30days"
string endpoint; // Agent endpoint URI
string ipfsHash; // Optional metadata
}示例指标:服务质量87/100 → ;在线时长99.77% → 。
value=87, decimals=0value=9977, decimals=23. 验证注册表
- 独立验证代理的工作成果
- 信任模型:加密经济(抵押担保)、zkML、TEE证明
- 验证者返回0-100分的评分
Agent Registration File (agentURI)
代理注册文件(agentURI)
json
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "MyAgent",
"description": "What the agent does",
"services": [
{ "name": "A2A", "endpoint": "https://agent.example/.well-known/agent-card.json", "version": "0.3.0" },
{ "name": "MCP", "endpoint": "https://mcp.agent.eth/", "version": "2025-06-18" }
],
"x402Support": true,
"active": true,
"supportedTrust": ["reputation", "crypto-economic", "tee-attestation"]
}json
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "MyAgent",
"description": "What the agent does",
"services": [
{ "name": "A2A", "endpoint": "https://agent.example/.well-known/agent-card.json", "version": "0.3.0" },
{ "name": "MCP", "endpoint": "https://mcp.agent.eth/", "version": "2025-06-18" }
],
"x402Support": true,
"active": true,
"supportedTrust": ["reputation", "crypto-economic", "tee-attestation"]
}Integration
集成示例
solidity
// Register agent
uint256 agentId = identityRegistry.register("ipfs://QmYourReg", metadata);
// Give feedback
reputationRegistry.giveFeedback(agentId, 9977, 2, "uptime", "30days",
"https://agent.example.com/api", "ipfs://QmDetails", keccak256(data));
// Query reputation
(uint64 count, int128 value, uint8 decimals) =
reputationRegistry.getSummary(agentId, trustedClients, "uptime", "30days");solidity
// Register agent
uint256 agentId = identityRegistry.register("ipfs://QmYourReg", metadata);
// Give feedback
reputationRegistry.giveFeedback(agentId, 9977, 2, "uptime", "30days",
"https://agent.example.com/api", "ipfs://QmDetails", keccak256(data));
// Query reputation
(uint64 count, int128 value, uint8 decimals) =
reputationRegistry.getSummary(agentId, trustedClients, "uptime", "30days");Step-by-Step: Register an Agent Onchain
分步指南:链上注册代理
1. Prepare the registration JSON — host it on IPFS or a web server:
json
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "WeatherBot",
"description": "Provides real-time weather data via x402 micropayments",
"image": "https://example.com/weatherbot.png",
"services": [
{ "name": "A2A", "endpoint": "https://weather.example.com/.well-known/agent-card.json", "version": "0.3.0" }
],
"x402Support": true,
"active": true,
"supportedTrust": ["reputation"]
}2. Upload to IPFS (or use any URI):
bash
undefined1. 准备注册JSON文件——托管在IPFS或Web服务器上:
json
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "WeatherBot",
"description": "Provides real-time weather data via x402 micropayments",
"image": "https://example.com/weatherbot.png",
"services": [
{ "name": "A2A", "endpoint": "https://weather.example.com/.well-known/agent-card.json", "version": "0.3.0" }
],
"x402Support": true,
"active": true,
"supportedTrust": ["reputation"]
}2. 上传至IPFS(或使用任意URI):
bash
undefinedUsing IPFS
Using IPFS
ipfs add registration.json
ipfs add registration.json
→ QmYourRegistrationHash
→ QmYourRegistrationHash
Or host at a URL — the agentURI just needs to resolve to the JSON
Or host at a URL — the agentURI just needs to resolve to the JSON
**3. Call the Identity Registry:**
```solidity
// On any supported chain — same address everywhere
IIdentityRegistry registry = IIdentityRegistry(0x8004A169FB4a3325136EB29fA0ceB6D2e539a432);
// metadata bytes are optional (can be empty)
uint256 agentId = registry.register("ipfs://QmYourRegistrationHash", "");
// agentId is your ERC-721 tokenId — globally unique on this chain4. Verify your endpoint domain — place a file at :
.well-known/agent-registration.jsonjson
// https://weather.example.com/.well-known/agent-registration.json
{
"agentId": 42,
"agentRegistry": "eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"owner": "0xYourWalletAddress"
}This proves the domain owner controls the agent identity. Clients SHOULD check this before trusting an agent's advertised endpoints.
5. Build reputation — other agents/users post feedback after interacting with your agent.
**3. 调用身份注册表**:
```solidity
// On any supported chain — same address everywhere
IIdentityRegistry registry = IIdentityRegistry(0x8004A169FB4a3325136EB29fA0ceB6D2e539a432);
// metadata bytes are optional (can be empty)
uint256 agentId = registry.register("ipfs://QmYourRegistrationHash", "");
// agentId is your ERC-721 tokenId — globally unique on this chain4. 验证你的端点域名——在路径下放置验证文件:
.well-known/agent-registration.jsonjson
// https://weather.example.com/.well-known/agent-registration.json
{
"agentId": 42,
"agentRegistry": "eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"owner": "0xYourWalletAddress"
}该文件用于证明域名所有者控制代理身份。客户端在信任代理的公开端点前,应检查此文件。
5. 积累声誉——其他代理或用户与你的代理交互后会发布反馈。
Cross-Chain Agent Identity
跨链代理身份
Same contract addresses on 20+ chains means an agent registered on Base can be discovered by an agent on Arbitrum. The identifier includes the chain:
agentRegistryeip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 // Base
eip155:42161:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 // ArbitrumCross-chain pattern: Register on one chain (Base is cheapest for registration tx costs), reference that identity from other chains. Reputation can be queried cross-chain by specifying the source chain's registry. This is a cost optimization for the registration transaction — your app itself should deploy on the chain that fits (see ).
ship/SKILL.mdAuthors: Davide Crapis (EF), Marco De Rossi (MetaMask), Jordan Ellis (Google), Erik Reppel (Coinbase), Leonard Tan (MetaMask)
Ecosystem: ENS, EigenLayer, The Graph, Taiko backing
20+条链上的合约地址一致,意味着在Base链注册的代理可被Arbitrum链的代理发现。标识符包含链信息:
agentRegistryeip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 // Base
eip155:42161:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 // Arbitrum跨链模式:在一条链上注册(Base链的注册交易成本最低),从其他链引用该身份。可通过指定源链的注册表来跨链查询声誉。这是针对注册交易成本的优化——你的应用本身应部署在最适合的链上(详见)。
ship/SKILL.md作者:Davide Crapis(EF)、Marco De Rossi(MetaMask)、Jordan Ellis(Google)、Erik Reppel(Coinbase)、Leonard Tan(MetaMask)
生态支持:ENS、EigenLayer、The Graph、Taiko
EIP-3009: Transfer With Authorization
EIP-3009: 授权转账
You probably know the concept (gasless meta-transaction transfers). The key update: EIP-3009 is what makes x402 work. USDC implements it on Ethereum and most chains. The x402 server calls to settle payments on behalf of the client.
transferWithAuthorization你可能已经了解这个概念(无Gas元交易转账),关键更新:EIP-3009是x402协议可行的核心。USDC已在以太坊及多数链上实现该标准,x402服务器通过调用代表客户端完成支付结算。
transferWithAuthorizationx402: HTTP Payment Protocol
x402: HTTP支付协议
Status: Production-ready open standard from Coinbase, actively deployed Q1 2026.
Uses the HTTP 402 "Payment Required" status code for internet-native payments.
状态:Coinbase推出的生产就绪型开放标准,2026年第一季度已正式部署。
利用HTTP 402“需要支付”状态码实现原生互联网支付。
Flow
流程
1. Client → GET /api/data
2. Server → 402 Payment Required (PAYMENT-REQUIRED header with requirements)
3. Client signs EIP-3009 payment
4. Client → GET /api/data (PAYMENT-SIGNATURE header with signed payment)
5. Server verifies + settles onchain
6. Server → 200 OK (PAYMENT-RESPONSE header + data)1. Client → GET /api/data
2. Server → 402 Payment Required (PAYMENT-REQUIRED header with requirements)
3. Client signs EIP-3009 payment
4. Client → GET /api/data (PAYMENT-SIGNATURE header with signed payment)
5. Server verifies + settles onchain
6. Server → 200 OK (PAYMENT-RESPONSE header + data)Payment Payload
支付负载
json
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "1000000",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"from": "0x...", "to": "0x...",
"signature": "0x...",
"deadline": 1234567890,
"nonce": "unique-value"
}json
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "1000000",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"from": "0x...", "to": "0x...",
"signature": "0x...",
"deadline": 1234567890,
"nonce": "unique-value"
}x402 + ERC-8004 Synergy
x402 + ERC-8004 协同作用
Agent discovers service (ERC-8004) → checks reputation → calls endpoint →
gets 402 → signs payment (EIP-3009) → server settles (x402) →
agent receives service → posts feedback (ERC-8004)Agent discovers service (ERC-8004) → checks reputation → calls endpoint →
gets 402 → signs payment (EIP-3009) → server settles (x402) →
agent receives service → posts feedback (ERC-8004)x402 Server Setup (Express — Complete Example)
x402服务器搭建(Express完整示例)
typescript
import express from 'express';
import { paymentMiddleware } from '@x402/express';
const app = express();
// Define payment requirements per route
const paymentConfig = {
"GET /api/weather": {
accepts: [
{ network: "eip155:8453", token: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", amount: "100000" }
// 100000 = $0.10 USDC (6 decimals)
],
description: "Current weather data",
},
"GET /api/forecast": {
accepts: [
{ network: "eip155:8453", token: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", amount: "500000" }
// $0.50 USDC for 7-day forecast
],
description: "7-day weather forecast",
}
};
// One line — middleware handles 402 responses, verification, and settlement
app.use(paymentMiddleware(paymentConfig));
app.get('/api/weather', (req, res) => {
// Only reached after payment verified
res.json({ temp: 72, condition: "sunny" });
});
app.listen(3000);typescript
import express from 'express';
import { paymentMiddleware } from '@x402/express';
const app = express();
// Define payment requirements per route
const paymentConfig = {
"GET /api/weather": {
accepts: [
{ network: "eip155:8453", token: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", amount: "100000" }
// 100000 = $0.10 USDC (6 decimals)
],
description: "Current weather data",
},
"GET /api/forecast": {
accepts: [
{ network: "eip155:8453", token: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", amount: "500000" }
// $0.50 USDC for 7-day forecast
],
description: "7-day weather forecast",
}
};
// One line — middleware handles 402 responses, verification, and settlement
app.use(paymentMiddleware(paymentConfig));
app.get('/api/weather', (req, res) => {
// Only reached after payment verified
res.json({ temp: 72, condition: "sunny" });
});
app.listen(3000);x402 Client (Agent Paying for Data)
x402客户端(代理付费获取数据)
typescript
import { x402Fetch } from '@x402/fetch';
import { createWallet } from '@x402/evm';
const wallet = createWallet(process.env.PRIVATE_KEY);
// x402Fetch handles the 402 → sign → retry flow automatically
const response = await x402Fetch('https://weather.example.com/api/weather', {
wallet,
preferredNetwork: 'eip155:8453' // Pay on Base (cheapest)
});
const weather = await response.json();
// Agent paid $0.10 USDC, got weather data. No API key needed.typescript
import { x402Fetch } from '@x402/fetch';
import { createWallet } from '@x402/evm';
const wallet = createWallet(process.env.PRIVATE_KEY);
// x402Fetch handles the 402 → sign → retry flow automatically
const response = await x402Fetch('https://weather.example.com/api/weather', {
wallet,
preferredNetwork: 'eip155:8453' // Pay on Base (cheapest)
});
const weather = await response.json();
// Agent paid $0.10 USDC, got weather data. No API key needed.Payment Schemes
支付方案
exactupto- LLM inference: pay per token generated (unknown count upfront)
- GPU compute: pay per second of runtime
- Database queries: pay per row returned
With , the client signs authorization for a max amount. The server settles only what was consumed. Client never overpays.
uptoexactupto- LLM推理:按生成的代币数量付费(预先未知数量)
- GPU计算:按运行时长付费
- 数据库查询:按返回的行数付费
使用方案时,客户端签署最高金额的授权,服务器仅结算实际消耗的金额,客户端不会多付费。
uptoFacilitator Architecture
协调者架构
The facilitator is an optional server that handles blockchain complexity so resource servers don't have to:
Client → Resource Server → Facilitator → Blockchain
↓
POST /verify (check signature, balance, deadline)
POST /settle (submit tx, manage gas, confirm)Why use a facilitator? Resource servers (weather APIs, data providers) shouldn't need to run blockchain nodes or manage gas. The facilitator abstracts this. Coinbase runs a public facilitator; anyone can run their own.
SDKs: (TS) | (Python) |
@x402/core @x402/evm @x402/fetch @x402/expresspip install x402go get github.com/coinbase/x402/goResources: https://www.x402.org | https://github.com/coinbase/x402
协调者是可选的服务器,负责处理区块链相关复杂度,让资源服务器无需关注这些细节:
Client → Resource Server → Facilitator → Blockchain
↓
POST /verify (check signature, balance, deadline)
POST /settle (submit tx, manage gas, confirm)为什么使用协调者? 资源服务器(天气API、数据提供商)无需运行区块链节点或管理Gas费用,协调者会抽象这些复杂操作。Coinbase运营着一个公开的协调者,任何人也可以自行部署。
SDK:(TS)| (Python)|
@x402/core @x402/evm @x402/fetch @x402/expresspip install x402go get github.com/coinbase/x402/goEIP-7702: Smart EOAs (Live Since May 2025)
EIP-7702: 智能EOA(2025年5月上线)
EOAs temporarily delegate to smart contracts within a transaction. Best of both worlds: EOA simplicity + smart contract features.
Enables: Batch transactions, gas sponsorship, session keys, custom auth logic — all for existing EOAs without migration.
Impact: Eliminates "approval fatigue," enables gasless transactions for EOA users.
EOA可在单笔交易中临时委托权限给智能合约,兼顾EOA的简洁性与智能合约的强大功能。
支持功能:批量交易、Gas赞助、会话密钥、自定义授权逻辑——所有功能无需迁移现有EOA即可实现。
影响:消除“授权疲劳”,为EOA用户提供无Gas交易体验。
Quick Standard Reference
快速标准参考
| Standard | What | Status |
|---|---|---|
| ERC-8004 | Agent identity + reputation | ✅ Live Jan 2026 |
| x402 | HTTP payments protocol | ✅ Production Q1 2026 |
| EIP-3009 | Gasless token transfers | ✅ Live (USDC) |
| EIP-7702 | Smart EOAs | ✅ Live May 2025 |
| ERC-4337 | Account abstraction | ✅ Growing adoption |
| ERC-2612 | Gasless approvals (Permit) | ✅ Widely adopted |
| ERC-4626 | Tokenized vaults | ✅ Standard for yield |
| ERC-6551 | Token-bound accounts (NFT wallets) | ✅ Niche adoption |
These are all LIVE and being used in production. Not "coming soon."
| 标准 | 用途 | 状态 |
|---|---|---|
| ERC-8004 | 代理身份+声誉 | ✅ 2026年1月上线 |
| x402 | HTTP支付协议 | ✅ 2026年第一季度生产就绪 |
| EIP-3009 | 无Gas代币转账 | ✅ 已上线(USDC支持) |
| EIP-7702 | 智能EOA | ✅ 2025年5月上线 |
| ERC-4337 | 账户抽象 | ✅ 采用率持续增长 |
| ERC-2612 | 无Gas授权(Permit) | ✅ 广泛采用 |
| ERC-4626 | 代币化金库 | ✅ 收益标准 |
| ERC-6551 | 代币绑定账户(NFT钱包) | ✅ 小众采用 |
以上所有标准均已上线并投入生产使用,并非“即将推出”。