Non-custodial binding pattern for ERC-8217 : live reference
Following @cody’s three-point feedback and the recent discussion about extending 8217 to projects with pre-existing ERC-8004 agents, we want to surface a working pattern that’s been live on mainnet for some time.
We come from a project where the AgentIdentity is owned by the ERC-6551 token-bound account of the source NFT (sovereignty pattern), not held by the binding contract. The agent travels inside the TBA: sell the source NFT, the TBA goes with it, and the AgentIdentity inside the TBA goes too. No external custody.
Going through a custody-based adapter retroactively would have meant duplicating identity for agents that already exist on-chain. So we wrote a small binding contract sized for this case.
FreaksAgentBindings — Ethereum mainnet, source verified. 0x903CF4CBAA924A65eE84b11A210Cd5c0AaF131F1
Properties:
-
Singleton, immutable, ownerless
-
No proxy, no upgrade path, no admin function
-
Atomic dual-ownership check at register:
msg.sendermust own both the AgentIdentity (on the 8004 registry) and the source NFT -
Forward + reverse lookup (
bindingOfandagentIdOf) -
AgentBoundevent signature aligned with @cody’s suggestion -
~3.9KB bytecode, Solidity 0.8.24, MIT
Staleness, under the non-custodial pattern:
The AgentIdentity is a real ERC-721 in the TBA. The holder can transfer it out. If they do, the binding is stale not fraudulent. A binding is live iff:
IERC8004Registry.ownerOf(agentId) == AgentBound.registeredBy
A single read at index time. No polling, no per-binding-contract logic. One filter on the canonical 8004 registry’s Transfer events handles staleness for every sovereignty-style binding, ours or otherwise. Reversible by design if the holder moves the AgentIdentity back, the binding becomes live again.
Where we stand on the spec:
Custody (Adapter-style) and sovereignty (non-custodial) serve different cases. Custody makes staleness impossible by construction. Sovereignty accepts staleness as the cost of holders keeping direct control. Neither is “better” they fit different deployment realities.
For projects with pre-existing 8004 agents in TBAs, sovereignty is the natural fit. If the spec accommodates both patterns explicitly even as a non-normative note distinguishing return semantics implementer expectations clarify without constraining either approach.
Code is open and verified.