ERC-8033 Agent council oracle (Agent Council Oracles)
Draft · Other · created 2025-09-28
An on-chain oracle standard in which multiple AI agents reach a consensus answer to an arbitrary information query through a commit-reveal-judge process, and the agents that got the answer right share the reward.
Why it is needed
Existing data oracles are mostly specialized for numeric price feeds and often rely on centralized operators or a small set of nodes, making them expensive or inflexible for arbitrary one-off queries (such as prediction market outcomes or fact checks). If AI agents submit answers directly in plaintext, there is a risk of front-running, where answers are copied from earlier submissions or submission is delayed until a favorable answer appears, as well as censorship risk. In addition, when each project builds its own agent oracle with a different interface, it becomes hard for different implementations to call or substitute for one another, and there is no common bonding structure to penalize participants who submit wrong answers, making it difficult to minimize trust.
What to implement
event RequestCreated(uint256 indexed requestId, address requester, string query, uint256 rewardAmount, uint256 numInfoAgents, uint256 bondAmount);: Signals that a query has been created, and records the query content, the reward amount, the required number of Info Agents, and the bond together with it.event AgentCommitted(uint256 indexed requestId, address agent, bytes32 commitment);: Signals that an Info Agent has submitted the hash (commit) of an answer.event AgentRevealed(uint256 indexed requestId, address agent, bytes answer); // Or bytes for flexibility: Signals that an Info Agent has revealed the actual answer corresponding to a commit.event JudgeSelected(uint256 indexed requestId, address judge);: Signals that the Judge Agent selected to judge this query has been determined.event ResolutionFinalized(uint256 indexed requestId, bytes finalAnswer); // Or bytes: Signals that the final answer has been finalized.event RewardsDistributed(uint256 indexed requestId, address[] winners, uint256[] amounts);: Announces the list of agents who answered correctly and received rewards, along with each one's reward amount.event ResolutionFailed(uint256 indexed requestId, string reason);: Signals, with a reason, that resolution failed, for example due to not reaching quorum.event DisputeInitiated(uint256 indexed requestId, address disputer, string reason);: Signals, with a reason, that someone has disputed a finalized result.event DisputeWindowOpened(uint256 indexed requestId, uint256 endTimestamp);: Signals that a dispute window has opened, along with its end time.event DisputeResolved(uint256 indexed requestId, bool overturned, bytes finalAnswer);: Signals whether the dispute review upheld or overturned the existing result, along with the final answer.function createRequest(string calldata query, uint256 numInfoAgents, uint256 rewardAmount, uint256 bondAmount, uint256 deadline, address rewardToken, address bondToken, string calldata specifications, AgentCapabilities calldata requiredCapabilities) external payable returns (uint256 requestId);: The requester creates a new query by specifying the query, the required number of Info Agents, the reward amount, the bond, the commit deadline, the reward/bond token, and any other instructions and required capabilities.function commit(uint256 requestId, bytes32 commitment) external payable;: An Info Agent posts a bond and submits the hash (commit) of its answer.function reveal(uint256 requestId, bytes calldata answer, uint256 nonce) external;: An Info Agent that committed reveals the actual answer and nonce matching its commit.function aggregate(uint256 requestId, bytes calldata finalAnswer, address[] calldata winners, bytes calldata reasoning) external; // Winners for reward classification: The selected Judge Agent (or automatic processing, for deterministic queries) submits the final answer, the list of correct agents, and the reasoning.function distributeRewards(uint256 requestId) external;: After judging is complete, rewards are distributed to the agents who answered correctly.function getResolution(uint256 requestId) external view returns (bytes memory finalAnswer, bool finalized);: Looks up the final answer for the query and whether it has been finalized.function initiateDispute(uint256 requestId, string calldata reason) external payable;: Disputes a finalized result by posting a dispute bond along with a reason.function resolveDispute(uint256 requestId, bool overturn, bytes calldata newAnswer, address[] calldata newWinners) external;: Reviews a dispute, either upholding or overturning the existing result, and if overturned, submits a new answer and list of correct agents.function getRequest(uint256 requestId) external view returns (Request memory);: Looks up all the request information for the query.function getCommits(uint256 requestId) external view returns (address[] memory agents, bytes32[] memory commitments);: Looks up the commits submitted for the query and the list of submitting agents.function getReveals(uint256 requestId) external view returns (address[] memory agents, bytes[] memory answers);: Looks up the answers revealed for the query and the list of agents who revealed them.
In depth
Two agent roles
This standard clearly separates the roles into Info Agent, which submits individual pieces of information, and Judge Agent, which synthesizes the answers to reach consensus. A single-agent model blurs responsibility by mixing information gathering/synthesis with judgment, but separating the roles allows different competence and reputation criteria for each, makes the slashing (bond forfeiture) criteria for judgment failures clear, and leaves reasoning that a human can review. The authors see this as a foundation for the AI agent ecosystem to evolve into an 'information market' modeled on real-world councils or juries.
Five core flow steps
Implementations MUST follow the order of request creation, commit, reveal/collection, judging, and reward distribution. The requester posts the query and conditions via createRequest, which emits RequestCreated, and Info Agents submit a bond and hash via commit (closing at numInfoAgents). Afterward, answers are disclosed via reveal; if the reveal ratio falls short of the recommended quorum of over 50%, ResolutionFailed is emitted and funds are refunded. A randomly chosen Judge Agent (recommended to be selected from a separate pool) submits the final answer, the correct agents, and the reasoning via aggregate, which emits ResolutionFinalized, and distributeRewards then pays rewards to the correct agents and the Judge while forfeiting the bonds of those who got it wrong.
Why commit-reveal was chosen
Submitting answers in plaintext in a single round is simple, but it carries the risk of replication attacks where later submitters copy earlier answers, MEV/front-running on plaintext answers, and coercion/censorship risk from having to disclose an answer before everyone has participated. Commit-reveal hides the content during the commit phase so that no one can cheaply target a specific answer. It has the downside of higher gas costs (two transactions per agent, for commit and reveal), but this is considered offset by easier verification and a reduced attack surface. ERC-5732 has no built-in reveal mechanism, and ERC-162's commit-reveal did not fit well with text fields and this resolution flow, so both were considered as alternatives but not adopted.
Reward and bond token configuration
The Request struct lets rewards (rewardAmount, rewardToken) and bonds (bondAmount, bondToken) each be denominated in a separate token. If rewardToken is address(0), it means the native asset, and createRequest must be payable, funding the reward (and native bond) via msg.value. If rewardToken is nonzero, it must be an ERC-20, and implementations are recommended to pull funds via transferFrom. The bond is a slashable stake that can be forfeited if the answer is wrong or malicious, and may use a different token and amount than the reward.
Optional Dispute Procedure
Implementations may add a dispute mechanism after finalization. After finalization, a dispute window (disputeWindow) opens, and anyone can call initiateDispute by posting a disputeBond (e.g. 1.5 to 2x the original bond) along with a reason, which emits DisputeInitiated. A new Judge is randomly reselected with a higher minimum reputation threshold, and this Judge calls resolveDispute to either uphold or overturn the existing result. If upheld, the challenger's bond is forfeited to the correct agent and the dispute handlers; if overturned, the challenger's bond is refunded along with a partial reward (disputerReimbursement), and the original Judge's fee and bond are slashed and redistributed. The Judge who reviews the dispute receives a separate reward (judgeReimbursement).
Reputation Linkage, Callbacks, and ERC-20 Reward Extensions
Implementations can integrate with ERC-8004 to filter participation by an agent's or Judge's minimum reputation, or to use it for proportional rewards. It is recommended that Judge Agents have a higher minimum reputation than Info Agents. A callback(address target, uint256 requestId) can also be added to notify the requester's contract, and the standard can be extended to pay rewards in ERC-20 instead of the native token. All of these extensions are optional, and the core interface stays lightweight.
Recommendations on Capacity Limits
There is no hard cap on the number or size of capabilities, domains, queries, or answers, but to reduce gas costs and DoS risk it is recommended to set reasonable limits, such as a maximum item count (e.g. 64), bytes per item (e.g. 64 bytes), and total encoded bytes (e.g. 8192 bytes). Implementations should document these limits in code or documentation and revert with a descriptive error (e.g. CapListTooLong) when exceeded. In environments where gas cost is a major concern, it is recommended to store only an off-chain reference, such as an IPFS hash, in the struct.
Proposal status
ERC-8033 was created on 2025-09-28, requires ERC-20, and is currently in Draft status. It has not yet been finalized, so the interface and detailed rules may change or the proposal may stall.
Things to watch out for
- Collusion: Mitigated by bonds that are refunded for honest participation and forfeited on failure, random Judge selection, and optional reputation. Bonds deter spam and non-disclosure, and forfeited amounts are redistributed to other participants.
- Spam: Bonds and a cap on the number of participants prevent spam submissions.
- Failure Handling: Refunds occur when participation is low or participants drop out midway.
- Disputes: For high-risk queries, an optional dispute procedure with higher bonds and standards can be applied.
- Fairness of Random Judge Selection: Because the fairness of random Judge selection depends on the cryptographic strength of the randomness, implementations must audit against reentrancy attacks and use verifiable randomness.