ERC-8165 Agent On-Chain Intent Execution Standard (Agentic Onchain Operations)
Draft · Vaults & DeFi · created 2026-02-18
Defines an on-chain workflow in which an agent signs and presents a desired asset-transfer outcome, anyone can join as a solver to find an execution path, and the settlement result is recorded as a standard receipt.
Why it is needed
Ethereum transactions can only specify an execution path, not the desired outcome (goal). As agents and solvers proliferate, each uses its own notion of intent, but lifecycle, signature scheme, and receipt format differ across systems and are incompatible. Without a standard, every agent-solver pair must negotiate its own format, verification procedure, and completion signal from scratch, fragmenting the ecosystem and making it hard to reuse agents across multiple runtimes. ERC-8004 standardized agent identity and reputation, but it does not address how an agent expresses an executable goal or how that goal is verified on-chain.
What to implement
event IntentSubmitted(bytes32 indexed intentId, address indexed maker);: Emitted when an intent is submitted on-chain (Profile A).event IntentCancelled(bytes32 indexed intentId);: Emitted when the maker cancels an intent.event IntentFulfilled( bytes32 indexed intentId, address indexed maker, address indexed fulfiller, address receiver, address inputToken, uint256 inputAmountUsed, address outputToken, uint256 outputAmountNet, uint256 feeAmount, address feeRecipient, address executorAgent );: When settlement succeeds, issues a structured receipt recording settlement results such as input, output, fee, and executor.function submitIntent( Intent calldata intent, bytes calldata signature ) external returns (bytes32 intentId);: Registers a signed intent on-chain (Profile A).function cancelIntent(bytes32 intentId) external;: Callable only by the maker; marks the given (maker, nonce) as consumed to prevent future settlement.function fulfill( bytes32 intentId, bytes calldata executionData ) external returns (uint256 outputAmountNet);: Executes settlement by referencing a registered intent via its intentId.function domainSeparator() external view returns (bytes32);: Returns the EIP-712 domain separator currently used for signature verification.function fulfill( Intent calldata intent, bytes calldata signature, bytes calldata executionData ) external returns (uint256 outputAmountNet);: Settles an intent and signature that was never registered on-chain, passed in directly (Profile B).function getReceipt( bytes32 intentId ) external view returns (SettlementReceipt memory);: Looks up the settlement receipt for a fulfilled intent.function validate( Intent calldata intent, bytes calldata executionData ) external view;: Checks whether the execution data satisfies the intent's additional constraints, reverting if it does not.function publishConstraints( bytes4 constraintsType, bytes calldata constraintsData, address module ) external returns (bytes32 constraintsHash);: Registers the raw constraint data in a registry, making it publicly discoverable.function resolve(bytes32 constraintsHash) external view returns (address module, bytes memory data, bytes4 typeId);: Resolves a constraintsHash into the actual verification module address, raw data, and type identifier.
In depth
Intent structure and key safety bounds
An Intent consists of the fields maker, inputToken, inputAmountMax, outputToken, outputAmountMin, receiver, validAfter, validUntil, nonce, constraintsHash, feeBps, salt, and agentIdentity. It must be signed as EIP-712 structured data, and the domain separator must include chainId and verifyingContract. The maker must match the signer or be an address approved via ERC-1271, and validUntil must be greater than validAfter. The nonce is treated as an opaque value with only uniqueness enforced.
Fee Accounting
feeAmount is calculated as floor(outputAmountGross * feeBps / 10_000), using integer floor division. outputAmountNet is outputAmountGross minus feeAmount, and must be at least outputAmountMin. feeBps cannot exceed 10,000; if it equals 10,000, outputAmountNet becomes 0, and settlement must fail unless outputAmountMin is also 0. All amounts must be computed from actual balance deltas rather than trusting token return values, in order to correctly handle fee-on-transfer or rebasing tokens.
Two submission profiles (Profile A/B)
Profile A first registers the intent and signature on-chain via submitIntent, then settles by referencing it with fulfill(intentId, executionData). Profile B passes the entire intent each time via fulfill(intent, signature, executionData) without registration, and the intentId is computed deterministically. Cancellation (cancelIntent) is defined only for Profile A; Profile B implements off-chain cancellation by consuming the same (maker, nonce) through a different method. An implementation must support at least one profile.
intentId and domain binding
intentStructHash is a domain-independent EIP-712 struct hash, computed by abi.encoding INTENT_TYPEHASH together with all fields. intentDigest is the EIP-712 signing digest that binds this struct hash to a specific chain/hub's domainSeparator. intentId must equal intentStructHash, which allows it to be portable across domains, but actual authorization checks and replay protection are performed using the intentDigest bound to the hub-specific domainSeparator, so the same intentId cannot be reused on a different hub.
Settlement Rules
When executing fulfill, an implementation must perform, in order: signature verification (ECDSA or ERC-1271), expiry check, global uniqueness check of (maker, nonce), cancellation/fulfillment check (the constraint module step is skipped if constraintsHash is zero), verification that input is at most inputAmountMax, verification that output is at least outputAmountMin, atomic settlement execution, fee transfer to feeRecipient (defaulting to msg.sender if unspecified), and emission of an IntentFulfilled event that accurately reflects the actual result. If any condition fails, the transaction must revert.
Optional Constraint Module
constraintsHash can be resolved via IConstraintRegistry.resolve to look up the module address, raw data, and type identifier. A hub that supports constraint modules must, after checking signature, time, and nonce, look up the module and call module.validate(intent, executionData) before any external call that moves funds, and must mark (maker, nonce) as consumed only after that, before executing the actual transfer. validate must be a view function and must revert if conditions are not met. Because validate could be used for reentrancy or gas-griefing attacks, protections such as a trusted allowlist or a staticcall gas limit are recommended.
Receipt structure and ERC-8004 integration
SettlementReceipt has the fields fulfiller, receiver, inputToken, inputAmountUsed, outputToken, outputAmountGross, outputAmountNet, feeAmount, feeRecipient, executorAgent, settledAt, and executionHash. executionHash is optional, equal to keccak256(executionData), and is for tracing purposes only, with no guarantee of confidentiality. executorAgent is a self-declared value set by the executor and carries no on-chain authentication guarantee unless verified against an external registry such as ERC-8004.
Current status: Draft
This proposal is still in Draft status. Detailed requirements or interfaces may change during discussion, or the proposal may be discontinued.
Things to watch out for
- Abuse by an authoring agent acting on behalf of a principal: A malicious authoring agent could construct an intent that diverges from the principal's actual goal. The agentIdentity field enables after-the-fact attribution, and can be combined with the ERC-8004 reputation system for pre-execution verification.
- Front-running: A publicly broadcast intent can be observed and exploited by MEV searchers. Supporting a commit-reveal scheme can reduce this information exposure.
- Value extraction by solvers: A solver could technically satisfy the constraints while still extracting value through attacks such as sandwiching. outputAmountMin and inputAmountMax enforce a floor and ceiling, but surplus value between them can still be extracted.
- Malicious executor: An executor could attempt to execute only part of the intent, revert, or siphon off funds. Atomic settlement guarantees that execution either fully succeeds or fully fails, and an optional deposit requirement can serve as an additional deterrent.
- Fee extraction: It must be enforced that no fee beyond the signed feeBps is charged, and the fee calculation logic must be protected from manipulation that would spend funds beyond the declared limit.