ERC-8354 Agent Confidential Policy Allowance Proof (Confidential Agent Policy Verdicts)
Draft · Signatures & auth · created 2026-07-16
Defines a verdict and verification interface that, before an agent action is executed, shows via zero-knowledge proof only the fact that the policy evaluating that action allowed it, without ever disclosing the policy's content.
Why it is needed
Until now, standards governing agent actions have followed two paths. One is a post-hoc approach that records identity and reputation after the action. The other is a pre-signed approach that checks whether the actual action matches a specific delegation the user signed in advance. In both, the starting point of authority is the user's signature. But as with credit card fraud detection rules, in practice the cardholder often does not pre-sign every charge, and the rules are not disclosed, because disclosing the rules would reveal how to evade them. In this situation the remaining options were either putting the policy on-chain (which gets evaded) or simply trusting an off-chain oracle's judgment (which leaves no evidence the policy was actually applied), and both fail. This standard resolves this tension using zero-knowledge proofs.
What to implement
error AgentUnknown(uint256 agentId);: An error that occurs when the domain has designated an identity registry but the given agentId is not in that registry.error VerdictExpired(uint64 expiry);: An error that occurs when the verdict's expiry time has already passed.error VerdictReplayed(bytes32 nullifier);: An error that occurs when a verdict with an already-consumed nullifier is resubmitted.error ExecutorMismatch(address expected, address actual);: An error that occurs when the caller is not the verdict's designated executor and no separate signature is provided.error ExecutorAuthInvalid();: An error that occurs when the executor's signature is invalid in a submission via a relayer.error PolicyRootRejected(bytes32 root);: An error that occurs when the policy root the verdict points to is no longer within the allowed range.error DomainInactive(bytes32 domainId);: An error that occurs when the policy domain has been revoked and is inactive.error VerdictDenied();: An error that occurs when attempting to consume a verdict whose decision is DENY (0).error VerdictKindMismatch(uint8 decision, uint8 policyKind);: An error that occurs first of all when decision and policyKind do not match each other.error InvalidProof();: An error that occurs when zero-knowledge proof verification fails.function verify(Verdict calldata v, bytes calldata proof) external view returns (bool);: Checks only whether the verdict is valid without changing state.function verdictDigest(Verdict calldata v) external view returns (bytes32);: Computes the EIP-712 digest the executor must sign to delegate submission to a relayer.function consume(Verdict calldata v, bytes calldata proof) external;: The executor submits directly, verifying the verdict and burning the nullifier.function consume(Verdict calldata v, bytes calldata proof, bytes calldata executorAuth) external;: A relayer holding the executor's signature submits on the executor's behalf, verifying and consuming the verdict.function isConsumed(bytes32 domainId, bytes32 nullifier) external view returns (bool);: Looks up whether that nullifier has already been consumed in that domain.function policyDomain() external view returns (bytes32);: Tells the contract protected by the guard which policy domain it belongs to.function isRootAcceptable(bytes32 domainId, bytes32 root) external view returns (bool);: Checks whether a given root is the current root or is still allowed within maxRootAge.
In depth
The Verdict envelope and the four policyKind states
The Verdict struct has nine fields: agentId, domainId, policyRoot, actionCommitment, executor, expiry, nullifier, decision, and policyKind, all of which must be public inputs to the proving program. Decision is only a single bit, 0 (DENY) or 1 (ALLOW), which collapses every kind of denial into one, so policyKind breaks it down further into four states: ALLOWED (0), DENIED (1), NOT_PERMITTED (2), and COULD_NOT_EVALUATE (3). If decision is 1, policyKind must be 0; if decision is 0, policyKind must be one of 1, 2, or 3; if the two are inconsistent, the verdict is rejected before any other check.
actionCommitment and replay prevention
actionCommitment is a value binding block.chainid, domainId, agentId, target, value, keccak256(callData), and actionNonce together via abi.encode and keccak256. The guard must recompute this value directly from the action it is about to execute and compare it against Verdict.actionCommitment; it must not simply accept a value passed in by the caller. chainId prevents replay on a different chain, domainId prevents replay in a different policy domain, and actionNonce prevents repeated replay of the same action.
Separation of roles between the two hash functions
actionCommitment and the hashing of on-chain events and structs use only keccak256, which the EVM uses natively. By contrast, the keys/values of ERC-7812 statements, the policy inclusion proof, and the nullifier use the field-friendly hash H of the target EvidenceDB, which is Poseidon in the deployed singleton registry. Since a keccak256 digest is 256 bits, it does not fit directly into H's finite field, so it must be split into field-sized chunks (e.g. the upper and lower 128 bits) before being fed in.
The 9-step ordered checks in consume
consume must check in exactly this order and revert on the first failure: 1) decision and policyKind consistency, 2) if the domain has designated an identity registry, whether agentId exists in it, 3) domain active status, 4) decision==1, 5) executor authorization (direct msg.sender match or EIP-712 signature), 6) expiry time, 7) nullifier reuse, 8) policyRoot validity, 9) proof verification. Step 1 comes first because any later check could otherwise mask a mismatch in step 1.
A fixed interpreter design that avoids rewriting the circuit for every policy
Compiling a policy directly into a circuit means the verification key changes every time the rules change, requiring a new verifier to be redeployed on every chain. This is operationally impossible for a ruleset that changes weekly. Instead, by proving a fixed interpreter and passing the ruleset in as a private witness, programKey stays the same even as the policy changes, and only the ERC-7812 root moves. Because the interpreter must prove a broader scope than any single policy, the proving cost increases, which is an intended tradeoff.
Policy registration and audit trail via ERC-7812
A policy domain must register the ruleset hash (policyCommitment) via the ERC-7812 Registrar under the key H(domainId, version), and must not overwrite past versions. Unlike ERC-7812's usual blinding pattern, this commitment value is an unblinded plaintext hash, because blinding it would make it impossible even for the party holding the ruleset to verify, breaking the audit trail. Low-entropy rulesets must have a high-entropy salt appended before hashing.
Composition with ERC-8004, conditional identity checks
A domain can optionally designate an ERC-8004 identity registry via Domain.identityRegistry. If designated, agentId must exist in that registry via ownerOf, or it is rejected with AgentUnknown. If it is address(0), this check is not performed at all. After a successful consume, the guard can record a VerdictAttestation in the ERC-8004 Validation Registry, which includes artifactHash (= actionCommitment), policyRoot, and mechanism (keccak256("zk-secret-policy")), among others, and never includes the ruleset content.
A proposal still in Draft stage
This ERC is currently in Draft status, and the ERC-7812 and ERC-8004 it depends on are also not yet Final at the time of writing. The specification itself can hold even while in Draft or Review status, but for this standard to advance to Final, both of those dependent standards must become Final first. Implementers are advised to pin the exact versions of the two dependent standards.
Things to watch out for
- Executor binding is mandatory: Because proof generation and on-chain submission are separate, the verdict passes through the public mempool, and if executor is not among the proof's public inputs, anyone can grab the verdict from a pending transaction and front-run it. This binding cannot be satisfied by the guard merely checking msg.sender; it must be enforced inside the proving program, and using tx.origin is prohibited.
- The identity check is conditional: If the domain does not designate an identity registry, the agentId existence check is never performed at all, and a verdict carrying an id issued by no registry can still pass. The VerdictAttestation recorded after such a consumption ends up pointing to an uninterpreted identity.
- The root's validity period is effectively the revocation delay: Setting maxRootAge to 0 makes verdicts completely unusable during sync delays, while setting it too long means a rule that has already been removed keeps authorizing actions on every spoke chain for the duration of maxRootAge. DomainRevoked is the emergency path that bypasses this window entirely.
- A zero-knowledge proof does not prove the fairness of the judgment: A valid proof only proves that the committed ruleset was evaluated faithfully; it provides no guarantee whatsoever that the ruleset is correct, fair, or non-malicious. A domain that always allows everything can still produce a proof that verifies perfectly.
- Confidentiality and accountability are in tension with each other: A rejected agent cannot see why it was rejected, and there is no way to distinguish harsh-but-correct enforcement from a misapplied rule. Thanks to the unblinded commitment value, a domain can selectively disclose the ruleset to an auditor and match it against the commitment at that time, but this only works if the domain chooses to do so.