ERC-8273 · Draft · ERC · 2025-05-26
ERC-8273: Attestation-Gated Agentic Actions
A registry standard where a trusted attestor approves an AI agent's action and triggers it in the same transaction, with the approval held in transient storage so it vanishes when the transaction ends and cannot be reused.
What problem does it solve?
As AI agents start acting on-chain, protocols want to ask "is this caller a vetted agent, and is it allowed to do this particular thing?" An identity record such as ERC-8004 can say an address belongs to an agent, but it says nothing about a single operation, and it cannot guarantee the same agent is still behind that address.
ERC-8273 adds a per-operation layer. An attestor (an off-chain service the deployer trusts) evaluates the agent and the requested action, then issues an attestation and executes the action atomically. The attestation is active only inside that transaction. The standard defines the plumbing, not what is being attested; meaning comes from the capability value the attestor and the DApp agree on.
How it works
- One issuance entry point:
attestAndCall(subject, capability, evidenceHash, wallet, exec), callable only by authorized attestors. It:- stores a permanent audit record and emits
Attested; - writes the
attestationIdinto EIP-1153 transient storage, keyed by(wallet, capability, actionDigest)and by(subject, capability, actionDigest); - runs the action so that the target DApp sees the agent's own wallet as
msg.sender; - reverts everything if the action fails.
- stores a permanent audit record and emits
- Scope has two axes:
capabilityis a coarse class such askeccak256("DEFI_ACCESS_V1").actionDigestbinds one concrete call (target, selector, arguments and a nonce).actionDigest = 0means capability-only mode, which must not be used for value transfers or other high-risk actions.
- Execution profiles define how the wallet makes the call: a direct profile for smart wallets or EIP-7702 accounts exposing
executeFromRelayer, or an ERC-4337 profile that submits a UserOperation the agent's account already authorized. - Gating: the DApp calls
getActiveAttestationByWallet(msg.sender, capability, digest), which reverts if no active attestation exists. Bool views such asisAttestedAddressexist for indexers and UIs and must not be the only check. - When the transaction ends, the EVM clears transient storage, so nothing persists as reusable authorization.
Sample code
A reward contract that only pays agents carrying a fresh attestation:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IERC8273WalletAttestation {
struct AttestationRecord {
uint256 subjectId; bytes32 subjectType; address attestor;
bytes32 capability; bytes32 actionDigest; uint64 issuedAt;
uint8 status; bytes32 evidenceHash; address wallet;
}
function getActiveAttestationByWallet(address wallet, bytes32 capability, bytes32 actionDigest)
external view returns (AttestationRecord memory);
}
contract RewardDistributor {
IERC8273WalletAttestation public immutable registry; // the registry you trust
bytes32 public constant DEFI_ACCESS = keccak256("DEFI_ACCESS_V1");
bool private locked;
constructor(IERC8273WalletAttestation r) { registry = r; }
function claimReward() external {
require(!locked, "reentrant");
locked = true;
// Reverts unless an attestor opened a window for msg.sender in this tx.
registry.getActiveAttestationByWallet(msg.sender, DEFI_ACCESS, bytes32(0));
_payReward(msg.sender);
locked = false;
}
function _payReward(address agent) internal { /* ... */ }
}
The capability-only mode is used here only because the check is "is this an approved agent"; anything moving funds per call should use a non-zero actionDigest.
Things to know
- Status: Draft. Interfaces may change.
- The attestor sits on the hot path: if it is offline, gated actions cannot run. The spec suggests the asynchronous ERC-8004 validation registry when per-action, synchronous approval is not needed.
- An active attestation does not stop reentrancy within the same transaction, so gated functions must use a reentrancy guard.
- Anyone can deploy a registry. A DApp must name the registries it trusts rather than trusting any contract that reports support via ERC-165.
- A compromised attestor can approve many transactions until it is removed; registries should limit attestor authority and monitor
Attestedevents.