eip: 8263
title: On-Chain Inference Attestation Registry for AI Agents
status: Draft
type: Standards Track
category: ERC
pr: Add ERC: Onchain Proof Layer for AI Agents by TruthAnchor-AI · Pull Request #1748 · ethereum/ERCs · GitHub
Motivation
AI agents are increasingly producing on-chain transactions — quoting prices,
routing trades, signing intents, calling tools. Today there is no standard way
for a third party to ask “did this specific agent actually produce this output,
against which model, with which prompt, using which tool calls?”
Without a verification primitive, four problems get worse fast:
- Disputes between agent operators and users have no audit trail
- Insurance / coverage products for agent behavior have no underlying truth set
- Agent reputation is fully off-chain and trivially Sybil-able
- Composable agent-to-agent calls have no standard provenance hop
ERC-8263 proposes a minimal registry + canonical payload so anchoring an
inference is one transaction and verifying one is one read call.
Specification (Summary)
A single Registry contract exposing:
function anchor(
bytes32 contentHash, // sha256 of canonical payload
bytes32 metadataHash, // sha256 of metadata blob (model, prompt hash, tools)
address agent, // EIP-712 signer of the inference
bytes calldata sig // agent's signature over (contentHash | metadataHash | chainId | nonce)
) external returns (uint256 anchorId);
function verify(uint256 anchorId) external view returns (
bytes32 contentHash,
bytes32 metadataHash,
address agent,
uint64 blockTimestamp
);
event Anchored(uint256 indexed anchorId, address indexed agent, bytes32 contentHash);
Canonical payload spec (truthanchor/v2) defines required fields:
model (string, e.g. gpt-4o-2024-08-06)
prompt_hash (sha256)
output_hash (sha256)
tool_calls[] (ordered array of {name, args_hash, result_hash})
parent_anchor_id (optional, for causal chains)
Full spec in PR #1748.
Rationale
A few choices worth defending:
Why a single registry contract, not per-agent contracts. Per-agent deploys
make discovery hell and 10x the gas overhead for what is fundamentally an event
log. A singleton with agent as an indexed parameter gives The Graph / Dune
indexers a clean primary key without sacrificing per-agent autonomy.
Why hash-only, not full payload on-chain. Inference outputs are large and
often privacy-sensitive (user prompts). Anchoring only contentHash + metadataHash
keeps gas predictable (~50k) and lets operators choose their disclosure layer
(IPFS, S3, none).
Why EIP-712 sig over agent-owned EOA. Agents need delegatable identity.
EIP-712 lets a relayer pay gas while the agent's key still signs the claim —
no trust-me-bro intermediation, no Account Abstraction prerequisite.
Backwards Compatibility
No conflicts with existing ERCs. Composes cleanly with:
ERC-8257 (Agent Tool Registry) — for the tool_calls[].name namespace
ERC-8004 — for the agent identity record this registry references
ERC-721 / 1271 — agent can be a contract wallet (1271 sig verification on path)
Reference Implementation
Working contract deployed on Sepolia: 0xb21B1dEA9424ce5aD520e13A4dA9e5B5bE4d2989
Mainnet: 0x68551e56067F96173B063167191E09477013876F
Multi-chain (Polygon, Base, BNB) live and indexable.
Verification explorer + SDK (Python + Node): https://truthanchor.biz
Open Questions for the Community
I'd specifically like editor + community input on three points before moving Draft → Review:
Should metadataHash be split into separate modelHash and promptHash
fields at the contract level, to make on-chain filtering by model cheaper?
It costs one extra storage slot per anchor but enables "show me all
inferences from gpt-4o" without an off-chain index.
Tool-call manifest format: keep it flat (current draft) or move to a
Merkle root over individual tool calls so a single tool call can be
selectively disclosed? Merkle is more elegant, flat is cheaper to verify.
Should the registry enforce monotonic per-agent nonces at the contract
level, or leave replay protection to the application layer? Enforcing
on-chain costs ~5k extra gas per anchor but removes a whole class of
replay bugs.
Related Threads
ERC-8257 Agent Tool Registry — composable on the tool layer
ERC-8004 — agent identity primitive
ERC-8183 Agentic Commerce — payment side of the same agent stack
Thanks for any feedback — happy to iterate aggressively on the spec before
finalizing.