ERC-8226 · Draft · ERC · 2026-04-12
ERC-8226: Regulated Agent Mandate
Proposes an on-chain mandate registry so a KYC-verified investor can give an AI agent scoped, time-limited, capped authority over a regulated token, and the token can check that mandate before every agent action.
What problem does it solve?
AI agents are starting to manage portfolios that include tokenized regulated assets (fund units, securities). For an agent to buy or move such a token for an investor, three things need to hold at once: the investor is a verified, compliance-cleared identity; the agent's authority is traceable, time-bounded and capped (the spec compares it to a power of attorney); and the token contract can check that authority atomically when the action happens.
Regulated token standards such as ERC-7943 and ERC-3643 decide who may hold a token, and agent registries such as ERC-8004 say which agents exist, but nothing defines what this agent may do for this investor. ERC-8226 (RAMS, Regulated Agent Mandate Standard) fills that layer.
How it works
Two interfaces, ideally run by different operators:
IComplianceProvider(e.g. a KYC provider adapter) grants and revokes principal eligibility and answerscheckPrincipal(principal, identityRef)witheligible, aReasonCode(KYC_EXPIRED,AML_FLAG,JURISDICTION_BLOCKED, …) and anexpiresAt.IAgentMandate(the RAMS registry) stores one active mandate per(agent, principal, asset)with a validity window, a per-transaction cap, a cumulative cap, a list of enabledbytes32action labels and the compliance provider used.
The lifecycle:
- The principal calls
grantMandatedirectly or signs it as EIP-712 typed data (domain name"RAMS"), verified with ERC-1271 so multisigs and smart wallets work. The registry checks the principal is eligible and that the mandate does not outlive their compliance window. - Before an agent action, the token (or an executor) calls
canExecute(agent, principal, asset, action, amount), which returnsokplus the first failing reason:NONEXISTENT,AGENT_FROZEN,PRINCIPAL_FROZEN,NOT_YET_VALID,EXPIRED,REVOKED,ACTION_NOT_ENABLED,OVER_TX_CAPorOVER_CUMULATIVE_CAP. - After the action,
recordExecutionadds the amount tocumulativeUsed.
The principal (or an approved operator) can revoke or extend; extending never resets the used amount. Authorised enforcers can freeze an agent or a principal, but cannot revoke a mandate.
Sample code
Gating an ERC-20 style transferFrom on a regulated token, adapted from the spec's reference modifier:
// `rams` is the IAgentMandate registry address held by the token
error MandateBlocked(IAgentMandate.MandateReason reason);
modifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {
bytes32 action = bytes32(selector); // left-aligned selector as the label
bool agentCall = msg.sender != holder;
if (agentCall) {
(bool ok, IAgentMandate.MandateReason reason) =
rams.canExecute(msg.sender, holder, address(this), action, amount);
if (!ok) revert MandateBlocked(reason);
}
_;
if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);
}
function transferFrom(address from, address to, uint256 value)
public override
gatedByMandate(IERC20.transferFrom.selector, from, value)
returns (bool)
{
return super.transferFrom(from, to, value);
}
Things to know
- Status is Draft.
- A mandate does not replace the token's own allowance or operator approval; both must pass.
- Eligibility is only checked at grant and extend time, not on every transfer, so a provider outage cannot freeze trading. A principal who loses eligibility mid-mandate is stopped by the token's own eligibility check (where it has one) or by an enforcer freeze.
- Caps are in the asset's own units (token amount, or 1 per NFT transfer), not fiat, and are per mandate, not per principal overall.
- Already-deployed tokens cannot gate themselves; for them the spec describes enforcement through an executor contract or an EIP-7702-delegated account.
- Whether a given mandate setup satisfies a particular regulator is outside the standard and needs legal review.