ERC-8262 Zero-knowledge compliance oracle

Review · Signatures & auth · created 2026-04-07

A standard that allows regulatory compliance checks such as anti-money laundering (AML) and sanctions screening to be verified on-chain using zero-knowledge proofs, without disclosing transaction amounts or counterparty information.

Why it is needed

On a public blockchain every transaction is fully exposed, so demonstrating regulatory compliance means disclosing the entire transaction amount and counterparty information, and transparent execution exposes transactions to maximal extractable value (MEV) attacks. Conversely, privacy tools have had no way to prove compliance and have sometimes become targets of sanctions. Existing alternatives also have limits. View keys amount to nothing more than delayed transparency, handing raw transaction data to auditors. Approaches that rely on trusted execution environments (TEEs) can have their hardware trust broken by side-channel attacks and key extraction, and privacy pool approaches only prove that an address is not part of a bad set, not that it complies with jurisdictional rules. In the end, without this standard you have to give up either transparency or privacy.

What to implement

In depth

Nine proof types

An implementation must support all nine proof types from 0x01 to 0x09, each a separate circuit with its own verification key. Compliance (0x01) proves that the weighted risk score across up to 8 provider signals is below the jurisdictional threshold; Risk Score (0x02) proves the score satisfies a specific bound or range; Pattern (0x03) proves a set of transactions is free of anti-structuring, velocity, and round-amount patterns. Attestation (0x04) proves the validity of a credential issued by a provider, and Membership (0x05) and Non-Membership (0x06) prove inclusion or non-inclusion in a Merkle-tree-based reference set. 0x07, 0x08, and 0x09 are the signed and M-of-N multisignature versions of 0x01 and 0x02 respectively, verifying secp256k1 ECDSA signatures inside the circuit itself. All types include the submitter as a public input.

Jurisdictional thresholds and policies

There are five jurisdictions: EU (0), US (1), UK (2), Singapore (3), and UAE (4), with risk scores expressed in bps (0 to 10000). The high-risk threshold is 7100 or above for EU, UK, and UAE, 6600 or above for the US, and 7600 or above for Singapore. Each jurisdiction must also publish whether it accepts unsigned proofs (0x01, 0x02) and the minimum threshold_m for 0x09. As reference values, the EU and UK accept unsigned proofs with a minimum of 1 signer, while the US, Singapore, and UAE reject unsigned proofs and require a minimum of 2 signers. Policies can only be changed by hardcoding or through time-delayed governance such as verifier upgrades, not configured on a per-submission basis.

The oracle's public input validation

Because a circuit only guarantees internal consistency, the oracle must semantically validate the public inputs at submission time. Common rules require that the submitter equal msg.sender (submitter binding), that the result boolean be exactly 1, and that the timestamp not be in the future and fall within the maximum lifetime set by the implementation (1 hour in the reference implementation). It must also maintain a non-decreasing timestamp ratchet per (subject, jurisdiction, proof type) so that an older proof cannot overwrite a newer record. The compliance slot that checkCompliance reads only records 0x09, and, for jurisdictions whose minimum number of multisig signers is 1, 0x01 and 0x07; all other types are recorded only in their type-specific slots and must be queried via checkComplianceByType.

Proof hashing and replay prevention

The proofHash of an attestation must be computed as keccak256(abi.encodePacked(proof, proofType, block.chainid, address(this))). The proofType guarantees uniqueness per type, and the chain ID and oracle address prevent on-chain replay across forks or other deployments. Chain binding inside the circuit exists only for the signed variants (0x07, 0x08, 0x09), which require chain_id to match block.chainid and oracle_address to match the oracle's address, so a single signature is bound to a single deployment. Because different domain tags are used per signature type, a signature produced for 0x07 cannot satisfy a 0x09 slot.

Attestation time-to-live (TTL)

An attestation expires at the submission-time block.timestamp plus attestationTTL. The default TTL is 86400 seconds (24 hours), with a minimum of 3600 seconds (1 hour) and a maximum of 2592000 seconds (30 days). checkCompliance() must return false for an expired attestation, but an expired record must still be queryable via getHistoricalProof() for proof-of-innocence purposes. The TTL is changed by the oracle administrator via updateAttestationTTL().

Verifier versioning and revocation

A verifier upgrade must not invalidate proofs that were previously valid. An append-only version history must be maintained per proof type, exposing the three operations getVerifierVersion, getVerifierAtVersion, and verifyProofAtVersion. A past version found to be flawed can be revoked; revocation must not erase it from the history, but re-verifying against a revoked version must fail, and revoking the current version is prohibited. Revoking a version also invalidates any attestations it verified, so checkCompliance and checkComplianceByType must not report them as valid. Revocation may offer both a delayed path (6 hours in the reference implementation) and an immediate path used by a guardian role. The verifier address must be resolved only once per submission and used identically for both verification and the recorded verifierUsed.

Circuit conventions and commitments

The proof system must achieve at least 128-bit security against forgery (Groth16, PLONK, UltraHonk, etc.), and the reference implementation uses Noir circuits with UltraHonk. The normative constants are MAX_WEIGHT 10000, MAX_PROVIDERS 8, MAX_TRANSACTIONS 16, MERKLE_DEPTH 20, and MAX_PROVIDERS_MULTI 5; deviating from these produces an incompatible verifier. All commitments use the same Pedersen hash, and Merkle leaves and signature digests attach nine distinct domain tags, including DOMAIN_INTERNAL and DOMAIN_SIGNED_SIGNALS, to prevent cross-purpose reuse. In fixed-size slot arrays, an inactive slot must have every field set to zero so it does not affect the commitment hash.

Batch submission limits

verifyProofBatch and submitComplianceBatch must enforce a maximum batch size, set so that a full batch fits comfortably within the target chain's block gas limit. The reference implementation caps both at 10 items, and a submitComplianceBatch of 10 items costs about 24.1 million gas, fitting within a 30 million gas block. When deploying to chains with different block budgets, the limit must be re-tuned. All items in a batch must share the same jurisdiction, and if even one item fails verification, validation, or replay checks, the entire batch reverts.

Current status

The original status of this proposal is Review. It is not yet a finalized standard, and the specification may change during discussion.

Original ERC · ← ERCs