Draft ERC: Policy-Enforced Agent Accounts

Hi all. We’d like feedback on a draft ERC for a problem we hit while running agent accounts in production: there is no standard way for an app, wallet or lender to tell whether an agent’s account is protected by an external policy signer, what that policy allows, or why something was refused.

What it adds: a read-and-evidence layer. It doesn’t define how anything is enforced.

  • Discovery (ERC-165 0xcc16d336): policySigner(account), policyOf(account), pendingPolicyOf(account), mandateOf(account), isStopped(account). Served by the account itself, or by a singleton registry for existing accounts such as Safes. With the registry, the account declares its signers itself, and only its declared publisher can post for it.
  • Policy commitments: the hash of the policy document, with an optional URI where anyone can fetch it and check it. The hash is keccak256 of the document’s RFC 8785 canonical JSON.
  • Pending loosenings: these are public with their effectiveAt, and the registry switches to them by time alone. A quiet loosening is the usual step before a drain, so watchers get the delay to react.
  • Reason codes: an append-only bytes32 list (TARGET_NOT_ALLOWED, OVER_TX_CAP, HUMAN_APPROVAL_REQUIRED, ASSET_UNSAFE…). Vendor detail goes in a separate namespaced detailCode. Names follow ERC-8226 where they mean the same thing.
  • Decision receipts: EIP-712, bound to the exact intent (chain, account, target, value, calldata hash), the policy hash and an expiry. They’re verified against the account’s declared receipt signer, with ERC-1271 for contract signers.

How it relates to existing work:

  • ERC-7579 and 7780 enforce inside the account. ERC-7710 delegates with caveats. The ISpendGate thread gates at the token. ERC-8226 stores mandates for regulated assets. ERC-8196 prescribes a whole wallet.
  • This proposal is complementary to all of them. It is how anyone reads what is enforced, whatever the enforcer is.
  • We didn’t find an existing standard covering an external policy signer, an on-chain commitment to an off-chain policy, or verifiable decision receipts. Pointers welcome.

It is live, not only a document:

  • The reference registry is deployed and verified on Robinhood Chain mainnet (4663) at 0x20D6B38B47F7cb765A2318a1f318ed54a6f87e92. There is no owner, no upgrade path and no funds.
  • A production enforcer (Palisec) publishes its accounts’ commitments there and signs receipts in this format.
  • Test vectors are checked in both TypeScript and Solidity.
  • A small client library (policy-enforced-accounts on npm) reads any compliant account and verifies receipts with no API key.
  • Guide and spec: Standard: Policy-Enforced Agent Accounts · Palisec

Open questions for the community:

  1. Is a registry the right default for existing accounts, or should we push accounts to implement the interface natively (for example as a 7579 fallback)?
  2. Should policySigner also carry a type tag (co-signer, module or guard), so readers know which configuration checks to run?
  3. Is the common-core policy vocabulary useful, or should schemaURI alone carry the format?
  4. Receipt lifetime: should the spec cap it?

The ERC pull request follows in a reply below.

The ERC pull request is open: Add ERC: Policy-Enforced Agent Accounts by palisec-dev · Pull Request #2196 · ethereum/ERCs · GitHub

The reference implementation and the test vectors are in its assets folder.