ERC-8299 AI Inference Input Provenance Attestation (WYRIWE — Input Provenance for AI Inference)
Draft · Signatures & auth · created 2026-05-28
A standard that uses hashes and EIP-712 signatures to prove that the input an AI agent passed to a model is either the original submitted by the user or has been altered only according to publicly disclosed rules.
Why it is needed
Standards such as ERC-8004 and ERC-8126 confirm which agents are registered and trustworthy, but they cannot prove what input an agent actually processed in a particular call. If an agent or gateway sanitizes or substitutes the user's input between request acceptance and model execution, there is no way to prove that alteration occurred. As a result, settlement contracts cannot confirm that the delivered output actually came from the input that funded it, attestation verifiers cannot confirm that the inputHash they received matches the original request, and commit-reveal style dispute resolution mechanisms have no evidentiary basis for what the model was actually asked. WYRIWE fills this gap with a hash-based commitment that the gateway creates at execution time and that anyone can verify independently.
What to implement
WyriweAttestation(bytes32 agentId,address registry,bytes32 modelHash,bytes32 rawInputHash,bytes32 sanitizationPipelineHash,bytes32 inputHash,bytes32 outputHash,bytes32 commitmentHash,uint256 timestamp): The canonical type string for the input provenance attestation record signed via EIP-712.JudgmentExecutionAttestation(bytes32 agentId,address registry,bytes32 validatorId,bytes32 rawProposalHash,bytes32 verdictHash,bytes32 executedActionHash,uint256 verdictTimestamp,uint256 executedTimestamp,string recordPointer): The type string for the attestation record linking a judgment validator's determination to actual execution.GET /agent/verify/:inputHash: An endpoint that lets a gateway expose the list of attestations it holds for a given inputHash.
In depth
Triple Hash Construction
A WYRIWE-compliant execution must produce three values. raw_input_hash is the keccak256 hash of the exact original bytes the user sent. sanitization_pipeline_hash is the keccak256 hash of the UTF-8 encoded ipfs:// URI pointing to the sanitization spec concatenated with raw_input_hash, binding the spec to this specific raw input so it cannot be reused for a different input. input_hash is the keccak256 hash of the sanitized input bytes actually fed to the model. The two endpoint hashes alone only show that the input changed, not by what rule it changed, so the pipeline hash in between binds the rule to the raw input in a way that is both verifiable and reproducible.
Identity Transform
Even when no sanitization is applied, the value must not be omitted. Instead, a fixed IPFS CID called IDENTITY_SENTINEL_CID (ipfs://Qmccvom6aRVgZ2dtFWvT6Wm3DmTvoAUHHotK7uQufnStVR) is used as sanitization_spec_uri, in which case input_hash equals raw_input_hash. The 760-byte JSON document this CID points to is fixed in the specification and simply states an identity-transform spec that applies no modification whatsoever. Implementations must not substitute a different value for this CID, and it is recommended that these 760 bytes be pinned so verifiers can validate the no-sanitization case on equal footing with the sanitized case. Had a null or zero value been used instead, there would be no way to distinguish a field that was omitted from a transform that occurred but was not committed.
WyriweAttestation Struct
The attestation is EIP-712 typed structured data and must populate all nine fields: agentId (the identifier assigned by the ERC-8004 registry), registry (the address of the ERC-8004 identity registry), modelHash (a commitment to the model that was executed), rawInputHash, sanitizationPipelineHash, inputHash, outputHash (keccak256(model_output)), commitmentHash, and timestamp (the Unix time at signing). commitmentHash is the keccak256 hash of abi.encode of agentId, modelHash, inputHash, outputHash, and timestamp as bytes32,bytes32,bytes32,bytes32,uint256, so these five values alone, without the full struct, can be checked against the signed record. If agentId is derived from a human-readable name, the derivation method must be specified, and ENS names must be mapped using the ERC-137 namehash rather than keccak256(name).
EIP-712 Domain and Signing Rules
The domain is fixed as name="WyriweAttestation", version="1", chainId equal to the ID of the chain where the registry is deployed, and verifyingContract equal to the registry address. Binding the domain to the registry means a signature made for one registry will not verify against another registry. Signatures must be made over an eth_signTypedData-style digest, in r||s||v 65-byte format, with v equal to 27 or 28 and s within the lower half of the secp256k1 curve order. Signatures made with eth_sign or personal_sign, which are prefixed with "\x19Ethereum Signed Message:\n", cannot be used. The address that produced the signature is the attestor.
The verification procedure and three outcomes
A verifier must check four steps and report one of verified, refuted, or unverifiable. It must recover the signer and confirm it is an acceptable attestor (ecrecover recovers some address from any signature, so merely confirming it is not zero is not enough), recompute the commitmentHash from agentId, modelHash, inputHash, outputHash, and timestamp and compare it, compare against raw_input_hash if the raw input is available, and fetch sanitization_spec_uri and confirm that the hash of applying the spec to the raw input equals input_hash. It is verified only if all four steps pass; it is unverifiable if only the first two steps pass but the raw input or spec is unavailable so the last two steps cannot be performed; it is refuted if any step fails.
The gateway lookup interface
A compliant gateway must provide GET /agent/verify/:inputHash. On success it returns HTTP 200 along with JSON listing, in most-recent-first order, every attestation it holds for that inputHash, where each entry contains the attestation struct, the EIP-712 domain, the signature, the attestor address, and sanitizationSpecUri. If it holds no attestations it must return HTTP 404. bytes32 and address values must be 0x-prefixed hexadecimal, timestamp must be a decimal string, and chainId must be a JSON number. Gateways are recommended to keep the content of every sanitizationSpecUri referenced by the attestations they serve continuously retrievable, for example by pinning it.
claimType and composing judgment
Every signed claim record has a claimType (which accountability model backs it) separate from its proofSystem (which cryptographic technique authenticated it). ReExecution is an objectively reproducible computation, Attestation is certification by an authorized signer, and Judgment is a subjective evaluation backed by reputation or policy. WyriweAttestation is pinned at Attestation grade via its typeHash, and JudgmentExecutionAttestation is pinned at Judgment grade. In implementations that compose a judgment layer, the three hashes rawProposalHash, verdictHash, and executedActionHash play the same role as WYRIWE's three hashes, and a verifier must confirm that the field list of verdict_preimage exactly matches the declared decision_ref_preimage_fields, that artifact_hash equals rawProposalHash, and that intended_verifier points to the same instance as itself. If intended_verifier is absent, that judgment is not bound to any particular verification gate and must not be treated as replay-safe.
This is not yet a finalized proposal
This ERC is in Draft status, submitted on May 28, 2026. Since it is still subject to community discussion and revision, the specific field names, hash composition, and EIP-712 domain name may change before finalization. In fact, the specification notes that prior implementations used different domain names, such as ERC8004AttestationGateway, or different pipeline hash compositions, and that signatures and hashes produced that way do not verify under this revision and must be reissued.
Things to watch out for
- You must check the acceptance list, not just the signer: Because ecrecover recovers an address from any signature, confirming only that the recovered address is not zero would let an attestation signed by anyone pass. A verifier must check the recovered signer against the list of attestors it accepts.
- If an attacker steals an attestor key, forged attestations become possible: Trust in an attestation rests on a single attestor key. Parties that use attestations for settlement or dispute resolution should record the list of acceptable attestors on chain and support key rotation. However, even a forged attestation cannot change the hash of the raw input itself.
- A sanitization spec can be malicious: WYRIWE only proves that a declared transformation was faithfully applied; it does not guarantee that transformation is safe. A gateway could publish a spec that alters an amount or recipient address and still prove it faithfully followed that spec, so parties that accept arbitrary spec URIs are recommended to maintain an allowlist.
- If the sanitization spec content disappears, verification stalls: sanitization_pipeline_hash is a commitment to the URI itself, not to its content. If the content can no longer be retrieved, the input-provenance verification step cannot be completed and the result remains unverifiable.
- A judgment verifier can be the same operator as the execution agent: Even if validatorId differs from the execution agent's attestor key, the same operator may hold both keys. A signature alone cannot prove a verifier's independence, so parties relying on the independence of a judgment must confirm it separately.