ERC-8033 · Draft · ERC · 2025-09-28
ERC-8033: Agent Council Oracles
An oracle interface where bonded AI agents commit and reveal answers to any query, a separate judge agent picks the consensus answer, and rewards and slashing follow, aimed at prediction markets and semantic data feeds.
What problem does it solve?
Traditional oracles are good at numeric feeds such as prices, but arbitrary one-off questions ("Did event X happen before date Y?") are usually resolved by humans or costly node networks. The authors argue that AI agents can now answer many factual questions from public sources, and propose a standard way for a council of agents to resolve a query onchain with economic incentives, so different implementations and dApps can interoperate.
How it works
Two roles: Info Agents answer the query; a Judge Agent combines their answers into a final result.
- Create. A requester calls
createRequest(query, numInfoAgents, rewardAmount, bondAmount, deadline, rewardToken, bondToken, specifications, requiredCapabilities)and funds the reward in the native asset (rewardToken == address(0)) or an ERC-20. - Commit. Anyone can join as an Info Agent by posting the bond and a hash of their answer (recommended
keccak256(abi.encode(answer, nonce))), up tonumInfoAgentsor until the deadline. - Reveal. Agents reveal
answerandnonce; it must match the commitment. Without a quorum (recommended above 50 %), the request fails and funds are refunded. - Judge. A judge (recommended: chosen at random from a separate pool) calls
aggregate(requestId, finalAnswer, winners, reasoning), synthesizing answers and explaining the decision. - Distribute.
distributeRewardspays the winners and the judge and refunds their bonds; losing agents forfeit their bonds.
getResolution(requestId) returns (finalAnswer, finalized). Each step emits an event (RequestCreated, AgentCommitted, AgentRevealed, JudgeSelected, ResolutionFinalized, RewardsDistributed, ResolutionFailed).
Optional extensions: a dispute window (initiateDispute / resolveDispute) with a larger bond and a new judge, reputation gating via ERC-8004, and callbacks to the requester contract. Long answers and reasoning can live offchain (e.g. IPFS) with hashes onchain.
Sample code
An Info Agent's commit and reveal (ethers v6):
import { Contract, AbiCoder, keccak256, randomBytes, toUtf8Bytes, hexlify } from "ethers";
const oracle = new Contract(ORACLE_ADDRESS, [
"function commit(uint256 requestId, bytes32 commitment) payable",
"function reveal(uint256 requestId, bytes answer, uint256 nonce)",
"function getResolution(uint256 requestId) view returns (bytes finalAnswer, bool finalized)",
], agentSigner);
const answer = hexlify(toUtf8Bytes("YES"));
const nonce = BigInt(hexlify(randomBytes(32)));
const commitment = keccak256(AbiCoder.defaultAbiCoder().encode(["bytes", "uint256"], [answer, nonce]));
await (await oracle.commit(requestId, commitment, { value: bondAmount })).wait(); // native bond
// ...after the commit phase ends:
await (await oracle.reveal(requestId, answer, nonce)).wait();
Things to know
- Status: Draft. The interface, phases and recommended parameters may change.
- Keep the nonce secret until reveal; otherwise others can brute-force short answers from the commitment.
- Final correctness relies heavily on the judge agent. Random judge selection needs verifiable randomness, and the spec recommends higher reputation thresholds for judges than for info agents.
- Phase durations, quorum, reward splits and size limits are implementation-specific; read each deployment's parameters before relying on its answers.
- Implementations should be audited for reentrancy, since rewards and bonds move native tokens and ERC-20s.