Skip to content

Back to the catalog

ERC-8419: Know-Your-Agent (KYA) Framework
ethereum-magicians.orgthread

ERC-8419: Know-Your-Agent (KYA) Framework

A technical forum post on Ethereum Magicians dissecting security gaps in ERC-8419 "Know-Your-Agent" (KYA), a proposed on-chain trust/attestation framework for AI agents that bridges to ERC-8004. The author walks through concrete exploit scenarios — a controller-bound assertion that still evaluates as valid after the underlying agent NFT is transferred, a policyId that can commit to a stricter policy document than the executable rules that actually run on-chain, ERC-8004 bridge configuration (trustedIssuers/responseMap) changes that silently alter what an existing request means, upgradeable verifier proxies that let a schemeId acquire new proof-admission semantics post-hoc, and missing chain/registry domain separation enabling cross-registry ZK nullifier replay — and proposes normative invariants (binding witnesses, rulesHash commitments, configHash, semantic immutability, mandatory domain separation) to close each one.

TL;DR Forum critique of draft ERC-8419 (KYA) identifies replay, commitment-binding, and configuration-drift vulnerabilities in an on-chain agent-attestation standard tied to ERC-8004.
Document

What it is

A Rev2 review comment on ERC-8419 (Know-Your-Agent), reducing all the framework's gaps to one invariant: every value or transformation capable of changing a KYA decision must either be committed by the identity of the object evaluated, or be explicitly declared live/external and excluded from any claim of complete policy satisfaction. The comment gives concrete hash constructions and a regression suite, which the catalog summary does not carry.

The concrete fixes proposed

  • Policy identity binds the executable projection. Today registerPolicyWithRules(policyURI, policyHash, allOf) derives policyId from owner, policyHash, and nonce — nothing proves the on-chain allOf rules match the committed document. Add a canonical rulesHash = H(canonical executable rules) and make policyId = H(owner, policyHash, rulesHash, nonce).
  • Bridge configuration identity. Adding the bridge address to requestHash fixed bridge ambiguity but not config ambiguity: the same assertion resolving to level 2 yields ERC-8004 response 100 under responseMap [0,50,100] vs 70 under [0,20,70], with the request/assertion/response-commitment all unchanged. Bind configHash = H(schemeId, trustedIssuers, responseMap) into request and response provenance.
  • Epoch authority MUST. Keep current = floor(block.timestamp / epochSeconds) with current - epochGrace <= epoch <= current. The prover MUST NOT control the epoch; the mechanism (block ranges, finalized periods) is profile-defined, but the authority is system/verifier-determined.
  • Tag collision. The bridge uses "kya:" + first 8 hex chars of schemeId — only a 32-bit discriminator, so two schemes can collide. Use the complete schemeId or another collision-resistant identifier.
  • Verifier semantic immutability. A PROVED scheme commits a verifier address; an upgradeable proxy keeps the address constant while verify() changes. Make it normative that any dependency capable of changing proof acceptance for an existing schemeId stays semantically immutable — semantic changes require a successor scheme.
  • Domain separation MUST (chain + registry) for canonical ZK admission; portability across registries becomes an explicit profile, not accidental nullifier replay.

Regression cases to add

Six named tests gate closure: policy-projection mismatch, controller transfer, bridge-config mutation, verifier semantic mutation, tag collision, cross-registry replay.

Caveats

This is a design-review comment on a proposal, not a disclosed vulnerability in deployed code — no CVE, no shipped contract. The author explicitly declines two design options (per-assertion binding kind; a heavier optional evaluator) and would instead precisely define the supported on-chain projection (top-level allOf, ordered-level schemes, issuer constraints) and reject anything outside it.

Technologies named here

  • ERC-8419
  • KYARegistry.check
  • KYAPolicyRegistry.evaluate
  • registerPolicyWithRules
  • KYARegistry
  • KYAPolicyRegistry
  • ERC-8004 bridge
  • immutable reference adapter
  • Ethereum

Standards and laws named here

Techniques named here

  • Epoch-based replay protection
  • Policy projection mismatch / commitment binding
  • Bridge configuration mutation
  • Shortened identifier collision
  • Verifier semantic mutation via upgradeable proxy
  • Cross-registry nullifier replay