
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.
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)derivespolicyIdfrom owner,policyHash, and nonce — nothing proves the on-chainallOfrules match the committed document. Add a canonicalrulesHash = H(canonical executable rules)and makepolicyId = H(owner, policyHash, rulesHash, nonce). - Bridge configuration identity. Adding the bridge address to
requestHashfixed bridge ambiguity but not config ambiguity: the same assertion resolving to level 2 yields ERC-8004 response 100 underresponseMap [0,50,100]vs 70 under[0,20,70], with the request/assertion/response-commitment all unchanged. BindconfigHash = H(schemeId, trustedIssuers, responseMap)into request and response provenance. - Epoch authority MUST. Keep
current = floor(block.timestamp / epochSeconds)withcurrent - 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
Related in Blockchain

THORChain Exploit Report #2 — GG20 root-cause disclosure

Black Thursday revisited: MakerDAO keeper exploited for $500K
.jpg)