Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC8226, which records the authority granted to an AI agent by an identity-verified asset holder on-chain in the form of permitted actions, validity periods, and quantity limits.

Overview

When an asset holder delegates buying and selling to an AI agent, identity verification alone is insufficient. Unless the system can check at execution time which assets, actions, time period, and quantities were authorized, it may grant the AI agent more authority than necessary. ERC8226 records these delegation conditions on-chain and allows only operations that satisfy them.

Suppose an investor who has completed identity verification delegates trading of corporate bond tokens to a trading AI. The investor signs a mandate for the corporate bond token specifying until the end of this month, transfers only, up to 100 units per transaction, and up to 500 units in total. The contract storing the mandate records the conditions and used quantity for each combination of trading AI, investor, and target token.

When the trading AI initiates an operation, the mandate contract checks the validity period, authorized action, per-transaction cap, and remaining cumulative allowance. The target token also independently checks whether the investor is permitted to transfer the asset. Only after both checks pass does the asset operation proceed, with the quantity used added to the cumulative total in the same transaction.

If the asset transfer or an external call reverts, the entire transaction rolls back, including the usage update. However, if a token reports failure by returning false rather than reverting, the execution site must also check the return value and revert.

Delegation from an asset holder to an AI agent

ERC8226 distinguishes the asset holder as the principal and the address operating on their behalf as the AI agent. The principal registers the target asset, start time, end time, permitted actions, per-transaction cap, and cumulative cap as a single mandate. The principal retains custody of the assets while granting only restricted authority to perform operations.

The principal can call the registration function directly or submit signed conditions to a third party for registration. After registration, operating on another asset of the same principal or calling an unauthorized function does not match the mandate. Keying mandates by three addresses identifies who operates, on whose behalf, and on which asset.

Overview of ERC8226 delegation and execution

Three layers of checks

Operations involving regulated assets and AI agents require three checks. First, verify the basis for treating the address as an AI agent. Then check the mandate granted by the asset holder to that agent, and finally have the target token validate its asset-specific transfer conditions.

AI agent registration, delegation, and asset-specific conditions

ERC8226 defines the middle layer: delegation from the principal to the AI agent. It does not define identity verification itself or determine eligibility under individual jurisdictions. Nor does it replace the target token's balance or existing allowances, so an actual operation must pass all three layers independently.

Motivation

Identity verification alone does not establish authority

Even after an investor has completed identity verification, what they delegate to a trading AI is determined separately. The fact that an investor may hold corporate bond tokens does not mean the trading AI can freely transfer them. Conversely, even an address registered as a trading AI cannot operate on a particular investor's assets without a mandate from that investor.

Combining identity verification, AI agent registration, and per-asset mandates in one record makes it difficult to determine which authorization has expired. ERC8226 therefore separates the provider that verifies principal eligibility from the contract that stores mandate conditions. When eligibility expires, the principal can be frozen. When a mandate is revoked, only the relevant mandate needs to be terminated.

Why validity and quantity limits must be checked at execution time

Simply keeping a signed mandate document off-chain does not allow a contract to determine the remaining allowance at execution time. If a trading AI has already sent 100 corporate bond tokens four times and attempts to send another 150 units, the operation would exceed the cumulative cap of 500 and must be rejected within that transaction.

ERC8226 records the quantity for a single operation separately from cumulative usage. For a mandate of 100 units per transaction and 500 in total, an operation for 150 units is rejected immediately. Even an operation within the per-transaction cap is rejected if it requests 100 units when only 50 units of cumulative allowance remain.

Why suspension and revocation are separate

During an identity verification reassessment or investigation of suspicious activity, all mandates may need to be suspended temporarily. Deleting the mandates would make it impossible to restore their original conditions after the investigation and would also eliminate the audit records.

An ERC8226 freeze temporarily suspends mandates associated with an AI agent or principal. When an enforcement operator lifts the freeze, the mandates can resume with their validity periods and remaining allowances intact. Revocation, by contrast, permanently terminates a specific mandate at the request of the principal or an authorized representative and retains the revoked record.

Specification

Mandate key

A single mandate is identified by three addresses: the AI agent, principal, and target asset. Even for the same agent, a different principal or asset constitutes a separate mandate. A new mandate cannot be layered over an existing active mandate for the same triplet. To replace conditions, revoke the existing mandate and register a new one.

This key avoids combining assets with different unit prices and decimal precision in one cumulative total. If an aggregate budget across multiple assets is required, the principal-side application aggregates multiple mandates.

Main conditions defining a mandate, with additional registration inputs and stored state outside the diagram

The diagram shows the main conditions defining a single mandate. Registration also receives the compliance provider, identity verification reference, and supplementary information. After storage, the revocation state and cumulative usage are tracked as well.

Eligibility and mandate validity period

The provider verifying the principal's eligibility returns a reference to identity verification materials and a deadline for reassessment. This reassessment deadline is the expiry of the principal's eligibility verification. A mandate's end time cannot exceed that reassessment deadline. Eligibility without an expiration date uses expiresAt of 0 and is treated as the broadest validity period.

If a provider shortens an eligible principal's deadline, its relationship to already registered mandates becomes unclear. Therefore, bringing the reassessment deadline forward while maintaining eligibility is prohibited. To narrow eligibility, revoke it, emit a revocation event, and then register the new conditions.

Signed operations

The principal either calls the contract directly or signs the registration conditions and provides them to a submitter. The signed data includes the mandate conditions, a per-principal nonce, and a signature deadline. The contract advances the nonce after a successful signed operation, preventing reuse of the same signature.

EIP712 fixes the fields to be signed and the verifying contract through typed data. ERC8226 uses RAMS as the domain name and 1 as the version, including the current chain ID and the mandate registry address. This is the typed-data format used by the principal to sign a mandate, allowing verification that the signature is restricted to operations on this chain and this mandate registry.

For more on EIP712, see the following article.

If the principal is a contract wallet, query the contract to check whether the signature complies with the principal's rules.

Verification and nonce update order to prevent replay of a principal's signature

This diagram shows only the checks that prevent signature replay, not the complete mandate registration process. Check the nonce and advance it only when signature verification succeeds. Supporting ERC1271, which defines this verification method, allows multisigs and DAOs as well as EOAs to serve as principals. ERC1271 defines how a contract wallet verifies a principal's signature. The result of isValidSignature determines whether a multisig or DAO can be treated as the principal.

For more on ERC1271, see the following article.

Storing permitted actions

Permitted actions are stored as 32-byte labels selected by the token. When a function selector is used, convert it to a left-aligned bytes32(selector) so the value signed by the principal matches the value calculated by the token. Other labels that both parties can generate identically, including string hashes, can also be used.

At execution time, the permitted action can be checked with a single mapping read. However, when narrowing authority and re-registering, all previously permitted actions must be cleared. Otherwise, the AI agent could continue performing actions the principal has removed.

The specification does not limit the number of actions. The reference implementation also stores permitted actions in an array and clears all entries before re-registration, so registration gas costs increase with the number of actions.

Quantity limits

The mandate stores the quantity per operation and cumulative usage over its validity period. For an unlimited allowance, use the maximum uint256 value. When checking the cumulative cap, subtract the current cumulative value first to avoid overflow during addition.

Cumulative usage does not represent only quantities of assets transferred. For example, approveFor in the reference implementation does not transfer assets, but adds the allowance set by the AI agent to cumulative usage. Even if each ERC721 operation is recorded as a quantity of 1, this does not establish separate allowances for individual token IDs.

Extending a mandate does not reset cumulative usage. To grant a new allowance, revoke the existing mandate and register a new one.

Freezing and revocation

Freezing an AI agent suspends every mandate held by that agent. Freezing a principal suspends every mandate granted by that principal. Either freeze can be lifted without changing individual mandate records or cumulative usage.

Mandate registration, freezing, and revocation

Revocation terminates only the specific triplet of AI agent, principal, and asset. The record is not deleted; a revoked flag and an event remain. When re-registering the same combination, clear the old permitted actions and create a new mandate with cumulative usage starting at zero.

Order of execution eligibility checks

Execution eligibility is checked against several conditions in a fixed order, returning the first failure reason. The numeric values of the reason enum do not represent the check order. Existing numbers remain unchanged when new values are added in the future, so consumers branch on identifiers.

Order of mandate execution eligibility checks

  1. Check whether the mandate exists

    If no corresponding record exists, return NONEXISTENT.

  2. Check whether the AI agent or principal is frozen

    If the AI agent is frozen, return AGENT_FROZEN; if the principal is frozen, return PRINCIPAL_FROZEN.

  3. Check the validity period

    Before the start time, return NOT_YET_VALID; after the end time, return EXPIRED.

  4. Check revocation and permitted actions

    If revoked, return REVOKED; if the action is not permitted, return ACTION_NOT_ENABLED.

  5. Check the per-transaction and cumulative caps

    If the per-transaction cap is exceeded, return OVER_TX_CAP; if the remaining cumulative allowance is exceeded, return OVER_CUMULATIVE_CAP.

If every check passes, return OK. If information required for evaluation is unavailable, revert rather than substituting a denial reason. The mandate registry cannot determine insufficient balances or token-side allowances, so these cannot be grounds for returning OTHER.

Token-side allowances

Even with a valid mandate, existing permission to operate on the principal's assets is still required. For ERC20, check the allowance; for ERC721 and ERC1155, check operator approval. ERC8226 does not replace these checks. It adds an authorization check for AI agents. ERC20 defines allowances and transferFrom for fungible tokens, so the spender's available allowance must still be checked after the mandate passes. For ERC721, read the NFT owner and operator approval to determine whether the AI agent can move an individual NFT. For ERC1155, read balances for multiple token types and operator approval to determine whether the agent can move the specified quantity of a given ID.

For more on ERC20, see the following article.

For more on ERC721, see the following article.

For more on ERC1155, see the following article.

IComplianceProvider

This interface records identity verification and regulatory eligibility and returns eligibility decisions to the mandate registry. The principal registering a mandate specifies the compliance provider's address. Multiple principals or mandates can use the same provider. The standard does not prescribe how identity verification information is stored, allowing integration with on-chain credentials or external identity verification systems.

Distinct responsibilities of IComplianceProvider and IAgentMandate

Separating eligibility records from mandate records means the mandate registry's role does not change when the compliance provider is replaced.

ReasonCode

js
enum ReasonCode {
    COMPLIANT,
    KYC_EXPIRED,
    AML_FLAG,
    NOT_ACCREDITED,
    NOT_QUALIFIED,
    JURISDICTION_BLOCKED,
    IDENTITY_NOT_FOUND,
    ATTESTATION_REVOKED,
    OTHER
}

ReasonCode is an enum representing why the compliance provider determined that a principal was eligible or ineligible. Return COMPLIANT if eligible. For ineligible principals, distinguish expiry, AML issues, insufficient qualifications, jurisdictional restrictions, and missing or revoked identity verification materials. Use OTHER only for conditions not enumerated; it cannot be used as an umbrella value for existing reasons.

PrincipalGranted

js
event PrincipalGranted(address indexed principal, bytes32 indexed identityRef);

This event is emitted when registering a principal's eligibility.

  • Fields
Field Details
principal Address of the principal whose eligibility was registered.
identityRef A 32-byte reference to identity verification materials or credentials.

Event logs reveal which combination of principal and identity verification materials was registered. The reassessment deadline is not included in the event; read the current value using checkPrincipal.

PrincipalRevoked

js
event PrincipalRevoked(address indexed principal, bytes32 indexed identityRef, ReasonCode reason);

This event is emitted when a registered principal is made ineligible.

  • Fields
Field Details
principal Address of the principal whose eligibility was revoked.
identityRef Reference to the revoked identity verification materials.
reason The ReasonCode indicating why eligibility was revoked.

Monitoring services can detect this event and freeze mandates associated with the principal.

grantPrincipal

js
function grantPrincipal(address principal, bytes32 identityRef, uint48 expiresAt) external;

This function registers an identity-verified address and a deadline for reassessment.

  1. Check the principal and identity verification reference

    The implementation checks that the caller has registration authority and that the reference is not empty.

  2. Store eligibility and its deadline

    Associate the principal's address with the identity verification reference and reassessment deadline.

  3. Announce the registration

    Emit the PrincipalGranted event to complete the operation.

  • Parameters
Parameter Details
principal Address of the principal whose eligibility is being registered.
identityRef Reference to identity verification materials or credentials.
expiresAt Unix timestamp when reassessment becomes necessary. 0 indicates no expiry.
  • Execution conditions

  • Have the registration authority defined by the compliance provider.

  • Do not bring forward an existing deadline while maintaining eligibility.

  • To narrow the validity period, first emit a revocation event and then re-register.

revokePrincipal

js
function revokePrincipal(address principal, ReasonCode reason) external;

This function makes a registered principal ineligible and records the reason.

  1. Identify the registered principal

    Read the principal's current eligibility and identity verification reference.

  2. Store revocation status and reason

    Record ineligibility and the ReasonCode in the principal's record.

  3. Announce the revocation

    Emit the PrincipalRevoked event.

  • Parameters
Parameter Details
principal Address of the principal whose eligibility is to be revoked.
reason The ReasonCode indicating why eligibility was revoked.
  • Execution conditions

  • Have the revocation authority defined by the compliance provider.

  • The target principal must be registered.

  • Do not substitute OTHER for an existing reason.

checkPrincipal

js
function checkPrincipal(address principal, bytes32 identityRef)
    external view returns (bool eligible, ReasonCode reason, uint48 expiresAt);

This function returns whether the identity verification reference is valid and the principal is still eligible.

  1. Match the principal and reference

    Check whether the stored identity verification materials match identityRef.

  2. Check revocation status and expiry

    Map revocation, expiry, and insufficient qualifications to their ReasonCode values.

  3. Return a structured result

    Return eligibility, reason, and the reassessment deadline together.

  • Parameters
Parameter Details
principal Address of the principal whose eligibility is checked.
identityRef Reference to identity verification materials stored in the mandate.
  • Return values
Return value Details
eligible Current eligibility.
reason COMPLIANT if eligible, otherwise the reason for ineligibility.
expiresAt Reassessment deadline; meaningless if ineligible.
  • Execution conditions

  • The result must be evaluable.

    Revert if evaluation is impossible due to an external system outage.

  • If eligible is true, reason must be COMPLIANT.

  • If eligible is true, do not return an expiresAt in the past.

IAgentMandate

This interface registers, modifies, and freezes mandates from principals to AI agents, checks execution eligibility, and records usage. The contract does not custody assets. It stores only the state necessary to determine whether an AI agent can operate on a target asset on behalf of a principal.

MandateReason

js
enum MandateReason {
    OK,
    NONEXISTENT,
    NOT_YET_VALID,
    EXPIRED,
    REVOKED,
    ACTION_NOT_ENABLED,
    AGENT_FROZEN,
    PRINCIPAL_FROZEN,
    OVER_TX_CAP,
    OVER_CUMULATIVE_CAP,
    OTHER
}

MandateReason is an enum representing the first reason an operation was permitted or denied.

Value Stored state or input condition Decision
OK All conditions passed Execution permitted
NONEXISTENT No mandate for the triplet Deny
NOT_YET_VALID Before start time Wait until the start
EXPIRED After end time Register a new mandate
REVOKED Revoked by the principal Register a new mandate
ACTION_NOT_ENABLED Action not permitted Switch to a permitted action
AGENT_FROZEN AI agent is frozen Suspend until unfrozen
PRINCIPAL_FROZEN Principal is frozen Suspend until unfrozen
OVER_TX_CAP Exceeds per-transaction cap Reduce quantity
OVER_CUMULATIVE_CAP Exceeds remaining cumulative allowance Reduce quantity or register a new mandate
OTHER Implementation-specific condition not covered by the standard Apply implementation-specific handling

OTHER cannot be used in place of insufficient balance or allowance. If the mandate registry cannot evaluate the conditions, revert rather than returning a reason.

Mandate

js
struct Mandate {
    address agent;
    uint48 validFrom;
    uint48 validUntil;
    address principal;
    bool revoked;
    address complianceProvider;
    bytes32 identityRef;
    address asset;
    uint256 maxTransactionValue;
    uint256 maxCumulativeValue;
    uint256 cumulativeUsed;
    bytes32 metadata;
}

This struct combines mandate conditions and current usage. It is created at registration and read or written when checking execution eligibility and updating usage.

  • Fields
Field Details
agent AI agent receiving authority.
validFrom Time from which the mandate can be used.
validUntil End time of the mandate.
principal Asset holder granting authority.
revoked Whether the principal or a representative has revoked the mandate.
complianceProvider Provider that verified the principal's eligibility.
identityRef Reference to identity verification materials.
asset Asset covered by the mandate.
maxTransactionValue Maximum quantity for a single operation.
maxCumulativeValue Cumulative cap over the mandate's validity period.
cumulativeUsed Recorded cumulative usage.
metadata Optional 32-byte reference to off-chain information, including legal documents.

GrantMandateParams

js
struct GrantMandateParams {
    address agent;
    uint48 validFrom;
    uint48 validUntil;
    address principal;
    address complianceProvider;
    bytes32 identityRef;
    address asset;
    uint256 maxTransactionValue;
    uint256 maxCumulativeValue;
    bytes32 metadata;
    bytes32[] actions;
    uint256 deadline;
}

This struct groups the inputs used to register a mandate. The principal or submitter passes it to grantMandate; the contract verifies the signature and eligibility before storing it.

  • Fields
Field Details
agent AI agent receiving authority.
validFrom Start time of the mandate.
validUntil End time of the mandate.
principal Principal granting authority.
complianceProvider Contract verifying eligibility.
identityRef Reference to identity verification materials being checked.
asset Asset authorized for operations.
maxTransactionValue Per-transaction cap.
maxCumulativeValue Cumulative cap over the mandate's validity period.
metadata Optional reference to legal documents.
actions List of permitted action labels.
deadline Deadline for submitting the signature.

MandateGranted

js
event MandateGranted(
    address indexed agent,
    address indexed principal,
    address indexed asset,
    address complianceProvider,
    uint48 validFrom,
    uint48 validUntil,
    bytes32 metadata
);

This event is emitted when registering a new mandate.

  • Fields
Field Details
agent AI agent granted authority.
principal Principal who granted authority.
asset Target asset.
complianceProvider Provider that verified eligibility at registration.
validFrom Start time of the mandate.
validUntil End time of the mandate.
metadata Optional reference to off-chain information.

The permitted actions and quantity caps cannot be reconstructed from this event alone. getMandate returns current values including the validity period, caps, cumulative usage, and revocation status. Use isActionEnabled to check on-chain whether an individual action is still enabled.

To reconstruct the current action set from event history, start with the latest MandateGranted event for the same triplet. Discard preceding ActionEnabled events and collect only those emitted after the latest registration. This is because no disable event is emitted for actions removed during re-registration.

ActionEnabled

js
event ActionEnabled(address indexed agent, address indexed principal, bytes32 indexed action, address asset);

This event is emitted for each action enabled during mandate registration.

  • Fields
Field Details
agent AI agent authorized to perform the action.
principal Principal who granted authority.
action Permitted 32-byte action label.
asset Asset being operated on.

MandateRevoked

js
event MandateRevoked(address indexed agent, address indexed principal, address indexed asset, address revokedBy);

This event is emitted when a specific mandate is revoked.

  • Fields
Field Details
agent AI agent whose mandate was revoked.
principal Principal who had granted the mandate.
asset Asset covered by the mandate.
revokedBy Principal or representative who performed the revocation.

MandateExtended

js
event MandateExtended(address indexed agent, address indexed principal, address indexed asset, uint48 newValidUntil);

This event is emitted when an existing mandate is extended.

  • Fields
Field Details
agent AI agent covered by the extension.
principal Principal who granted the mandate.
asset Asset covered by the mandate.
newValidUntil Updated end time.

Cumulative usage is not reset by an extension, so previous usage carries forward after the event.

OperatorSet

js
event OperatorSet(address indexed principal, address indexed operator, bool approved);

This event is emitted when a principal grants or removes approval for a representative.

  • Fields
Field Details
principal Principal who configured the representative.
operator Representative concerned.
approved true grants approval; false removes it.

ExecutionRecorded

js
event ExecutionRecorded(
    address indexed agent,
    address indexed principal,
    bytes32 indexed action,
    address asset,
    uint256 amount,
    uint256 cumulativeUsed
);

This event is emitted when an AI agent's operation quantity is recorded in cumulative usage.

  • Fields
Field Details
agent AI agent that performed the operation.
principal Principal who holds the assets.
action Label of the executed action.
asset Target asset.
amount Quantity recorded in this operation.
cumulativeUsed Cumulative usage after recording.

AgentFrozen

js
event AgentFrozen(address indexed agent, address indexed enforcer);

This event is emitted when an enforcement operator freezes an AI agent.

  • Fields
Field Details
agent AI agent that was frozen.
enforcer Enforcement operator who performed the freeze.

AgentUnfrozen

js
event AgentUnfrozen(address indexed agent, address indexed enforcer);

This event is emitted when an enforcement operator unfreezes an AI agent.

  • Fields
Field Details
agent AI agent that was unfrozen.
enforcer Enforcement operator who performed the unfreeze.

PrincipalFrozen

js
event PrincipalFrozen(address indexed principal, address indexed enforcer);

This event is emitted when an enforcement operator freezes all mandates granted by a principal.

  • Fields
Field Details
principal Principal whose mandates are suspended.
enforcer Enforcement operator who performed the freeze.

PrincipalUnfrozen

js
event PrincipalUnfrozen(address indexed principal, address indexed enforcer);

This event is emitted when an enforcement operator unfreezes a principal.

  • Fields
Field Details
principal Principal whose mandates resume.
enforcer Enforcement operator who performed the unfreeze.

grantMandate

js
function grantMandate(GrantMandateParams calldata params, bytes calldata signature) external;

This function allows a principal to register a new mandate for an AI agent.

  1. Check the validity period and existing mandates

    Verify that the end time is later than the start time and current time, and that no active mandate exists for the same triplet.

  2. Verify the principal and eligibility

    Verify the direct call or signature, and query the compliance provider for the principal's eligibility and reassessment deadline.

  3. Store the mandate and actions

    Clear previous permitted actions, store the mandate with zero cumulative usage, and emit an event for each action.

  • Parameters
Parameter Details
params Input containing the principal, AI agent, asset, validity period, caps, and permitted actions.
signature Principal's signature. If empty, the caller must be the principal.
  • Execution conditions

  • The compliance provider must not be the zero address.

  • The principal must be eligible, and the mandate's end time must not exceed the reassessment deadline.

  • The end time must be later than the start time and current time.

  • Action labels must not contain zero.

  • No active mandate may exist for the same triplet.

revokeMandate

js
function revokeMandate(
    address agent,
    address principal,
    address asset,
    uint256 deadline,
    bytes calldata signature
) external;

This function allows a principal or approved representative to revoke an active mandate.

  1. Check the target mandate

    Verify that an active, unrevoked mandate exists for the triplet.

  2. Verify revocation authority

    Verify the principal, approved representative, or unexpired principal signature.

  3. Record the revocation

    Retain the record, set revoked to true, and emit the MandateRevoked event.

  • Parameters
Parameter Details
agent AI agent whose mandate is being revoked.
principal Principal who granted the mandate.
asset Asset covered by the mandate.
deadline Deadline for submitting the signature.
signature Principal's signature. If empty, the principal or representative calls directly.
  • Execution conditions

  • The mandate must exist and must not have been revoked.

  • The caller must be the principal or an approved representative, or possess a valid principal signature.

  • When using a signature, it must be within its deadline and the nonce must be unused.

extendMandate

js
function extendMandate(
    address agent,
    address principal,
    address asset,
    uint48 newValidUntil,
    uint256 deadline,
    bytes calldata signature
) external;

This function extends an existing mandate while retaining cumulative usage.

  1. Check the mandate and authority

    Verify the active mandate and the principal, representative, or principal signature.

  2. Recheck eligibility

    Query the compliance provider to confirm that the new end time does not exceed the reassessment deadline.

  3. Update only the end time

    Update validUntil, retain cumulative usage, and emit the MandateExtended event.

  • Parameters
Parameter Details
agent AI agent covered by the extension.
principal Principal who granted the mandate.
asset Asset covered by the mandate.
newValidUntil Updated end time.
deadline Deadline for submitting the signature.
signature Principal's signature.
  • Execution conditions

  • The mandate must exist and must not be revoked.

  • The new end time must be later than the current end time.

  • The principal must be eligible, and the new end time must not exceed the reassessment deadline.

  • The caller or signature must authorize the extension.

freezeAgent

js
function freezeAgent(address agent) external;

This function temporarily suspends every mandate associated with an AI agent.

  1. Verify enforcement authority

    Verify that the caller has freeze authority.

  2. Freeze the AI agent

    Store the freeze state at the AI agent level.

  3. Record the enforcing party

    Record the AI agent and enforcement operator in the AgentFrozen event.

  • Parameters
Parameter Details
agent AI agent to freeze.
  • Execution conditions

  • The caller must have enforcement operator authority.

unfreezeAgent

js
function unfreezeAgent(address agent) external;

This function unfreezes an AI agent.

  1. Verify enforcement authority

    Verify that the caller has unfreeze authority.

  2. Clear the freeze state

    Update the AI agent-level freeze state.

  3. Record the unfreeze

    Emit the AgentUnfrozen event.

  • Parameters
Parameter Details
agent AI agent to unfreeze.
  • Execution conditions

  • The caller must have enforcement operator authority.

freezePrincipal

js
function freezePrincipal(address principal) external;

This function temporarily suspends all mandates granted by a principal.

  1. Verify enforcement authority

    Verify that the caller is authorized to freeze the principal.

  2. Freeze the principal

    Store the freeze state at the principal level.

  3. Record the enforcing party

    Emit the PrincipalFrozen event.

  • Parameters
Parameter Details
principal Principal to freeze.
  • Execution conditions

  • The caller must have enforcement operator authority.

unfreezePrincipal

js
function unfreezePrincipal(address principal) external;

This function unfreezes a principal.

  1. Verify enforcement authority

    Verify that the caller has unfreeze authority.

  2. Clear the freeze state

    Update the principal-level freeze state.

  3. Record the unfreeze

    Emit the PrincipalUnfrozen event.

  • Parameters
Parameter Details
principal Principal to unfreeze.
  • Execution conditions

  • The caller must have enforcement operator authority.

setOperator

js
function setOperator(
    address principal,
    address operator,
    bool approved,
    uint256 deadline,
    bytes calldata signature
) external;

This function configures a representative who can revoke and extend mandates on behalf of the principal.

  1. Verify the principal's intent

    Verify the principal's direct call or signature, including the nonce and deadline.

  2. Update the representative's status

    Grant or remove approval according to approved.

  3. Announce the change

    Emit the OperatorSet event.

  • Parameters
Parameter Details
principal Principal configuring the representative.
operator Representative to approve or remove.
approved true grants approval; false removes it.
deadline Deadline for submitting the signature.
signature Principal's signature.
  • Execution conditions

  • The principal must call directly or a valid principal signature must be submitted.

  • When using a signature, it must be within its deadline and the nonce must be unused.

recordExecution

js
function recordExecution(
    address agent,
    address principal,
    address asset,
    bytes32 action,
    uint256 amount
) external;

This function adds the quantity of a successful AI agent operation to the mandate's cumulative usage.

  1. Verify recording authority

    Check that the call originates from the target asset, the principal's execution environment, or an address granted recording authority.

  2. Recheck the same conditions

    Check mandate existence, freezes, validity period, revocation, action, per-transaction cap, and cumulative cap.

  3. Update usage

    Add amount to cumulativeUsed and emit the ExecutionRecorded event.

  • Parameters
Parameter Details
agent AI agent that performed the operation.
principal Principal who holds the assets.
asset Target asset of the mandate and operation.
action Label of the executed action.
amount Quantity to add to cumulative usage.
  • Execution conditions

  • The caller must be the target asset, the principal's execution environment, or an address with recording authority.

  • All the same conditions as canExecute must pass.

  • The updated cumulative value must not exceed the cap.

canExecute

js
function canExecute(
    address agent,
    address principal,
    address asset,
    bytes32 action,
    uint256 amount
) external view returns (bool ok, MandateReason reason);

This function returns whether an AI agent can execute an operation of the specified quantity, along with the first failure reason.

  1. Identify the target mandate

    Read the mandate using the triplet of AI agent, principal, and asset.

  2. Check conditions in the prescribed order

    Check existence, freezes, validity period, revocation, action, per-transaction cap, and cumulative cap in order.

  3. Return approval or the first denial reason

    If all checks pass, return true and OK; otherwise return false and the corresponding MandateReason.

  • Parameters
Parameter Details
agent AI agent performing the operation.
principal Principal who holds the assets.
asset Asset being operated on.
action Action label to check.
amount Quantity to compare against the caps.
  • Return values
Return value Details
ok true if execution is permitted.
reason OK when permitted; otherwise the first failure reason.
  • Execution conditions

  • The stored values needed for the decision must be evaluable.

  • If evaluation is impossible, revert rather than returning a denial reason.

isActionEnabled

js
function isActionEnabled(address agent, address principal, address asset, bytes32 action)
    external view returns (bool);

This function returns whether the specified action is permitted by the mandate.

  1. Identify the mandate's action table

    Use the triplet of AI agent, principal, and asset as the key.

  2. Match the action label

    Read the stored value corresponding to action.

  3. Return permission status

    Return true if the action is permitted.

  • Parameters
Parameter Details
agent AI agent to check.
principal Principal who granted the mandate.
asset Target asset.
action Action label to check.
  • Return values
Return value Details
bool true if the action is permitted.
  • Execution conditions

  • Read-only; treat an absent mandate as no permission.

getMandate

js
function getMandate(address agent, address principal, address asset) external view returns (Mandate memory);

This function returns the entire mandate stored for the triplet.

  1. Construct the mandate key

    Combine the AI agent, principal, and asset.

  2. Read the stored record

    Retrieve the validity period, caps, cumulative usage, revocation status, compliance provider, and supplementary information together.

  3. Return the struct

    Return the data as a Mandate struct.

  • Parameters
Parameter Details
agent AI agent holding the mandate.
principal Principal who granted the mandate.
asset Asset covered by the mandate.
  • Return values
Return value Details
Mandate Stored mandate conditions and usage.
  • Execution conditions

  • Read-only; determine existence from the returned principal address.

isOperator

js
function isOperator(address principal, address operator) external view returns (bool);

This function returns whether the specified representative has been approved by the principal.

  1. Identify the principal and representative pair

    Read approval status using the two addresses.

  2. Return approval status

    Return true if the representative can revoke and extend mandates.

  • Parameters
Parameter Details
principal Principal granting representative authority.
operator Representative to check.
  • Return values
Return value Details
bool true if approved.
  • Execution conditions

  • Must be read-only.

isAgentFrozen

js
function isAgentFrozen(address agent) external view returns (bool);

This function returns whether the AI agent is frozen.

  1. Read the AI agent's freeze state

    Check the value stored at the AI agent level.

  2. Return the freeze state

    Return true if all mandates are suspended.

  • Parameters
Parameter Details
agent AI agent to check.
  • Return values
Return value Details
bool true if frozen.
  • Execution conditions

  • Must be read-only.

isPrincipalFrozen

js
function isPrincipalFrozen(address principal) external view returns (bool);

This function returns whether the principal is frozen.

  1. Read the principal's freeze state

    Check the value stored at the principal level.

  2. Return the freeze state

    Return true if all mandates are suspended.

  • Parameters
Parameter Details
principal Principal to check.
  • Return values
Return value Details
bool true if frozen.
  • Execution conditions

  • Must be read-only.

nonces

js
function nonces(address principal) external view returns (uint256);

This function returns the current nonce used for operations signed by the principal.

  1. Read the principal's nonce

    Retrieve the stored value associated with the principal's address.

  2. Return the current value

    Return the value to include in a new signature.

  • Parameters
Parameter Details
principal Principal whose nonce is checked.
  • Return values
Return value Details
uint256 Current nonce.
  • Execution conditions

  • Must be read-only.

DOMAIN_SEPARATOR

js
function DOMAIN_SEPARATOR() external view returns (bytes32);

This function returns a value that binds the typed data signed by the principal to the current chain and mandate registry.

  1. Construct the signature domain

    Combine the name, version, chain ID, and mandate registry address.

  2. Return the domain separator

    Return the 32-byte value shared by signature creation and verification.

  • Return values
Return value Details
bytes32 EIP712 domain separator.
  • Execution conditions

  • Must be read-only.

Integration with regulated tokens

When integrating into the token itself, add a mandate gate to every function that a caller other than the principal can invoke on the principal's behalf. Pass the caller as the AI agent and the source of the asset transfer as the principal to canExecute. When the target asset itself records usage, pass its own address as asset to recordExecution.

An ERC7943 token can check whether the sender and recipient are permitted to hold the asset before a transfer. After this check passes, the ERC8226 mandate check separately verifies the actions and quantity limits authorized by the principal for the AI agent. ERC7943 defines transfer eligibility and freezing for regulated tokens. The results of canSend and canTransfer determine whether the principal can transfer the asset.

For more on ERC7943, see the following article.

ERC3643 also allows the token itself to check principal eligibility. ERC8226 adds the authority granted to the AI agent while preserving those transfer conditions. ERC3643 defines identity-based transfer restrictions for security tokens, checking asset-specific regulatory conditions through identity verification and transfer eligibility independently of the mandate.

For more on ERC3643, see the following article.

Under a strict gate that treats every caller other than the principal as an AI agent, ordinary spenders also need mandates. To preserve ordinary allowances, the gate can check only callers with a mandate record. However, deleting a revoked record would allow the caller to fall through to the ordinary path, so retain records after revocation.

Additional considerations

Why mandates are separated by asset

Assets have different decimal precision and value, so simply adding quantities of different tokens does not produce a meaningful budget. For example, 100 units of a corporate bond token and 100 units of a real estate token have different values. Restricting each mandate to one asset makes it possible to compare quantities with caps without relying on external price information.

If a budget across multiple assets is needed, the principal-side application creates separate mandates and manages the aggregate budget independently. The ERC8226 registry does not convert prices across assets.

Three integration approaches

The mandate check can be implemented in the asset contract, the principal's execution environment, or an independent execution contract.

  • Asset contract

    A new or upgradeable token incorporates a gate into functions authorized for AI agents.

  • Principal's execution environment

    Use EIP7702 to configure execution code on the principal's account; that code checks the mandate before calling the target asset.

  • Independent execution contract

    An executor associated with the principal checks the mandate and forwards the call to an existing token.

EIP7702 enables execution code to be configured on an EOA temporarily or persistently. The token sees the principal's address as the caller, so the execution code distinguishes the AI agent from the principal. This mechanism runs delegated code in the principal's EOA context. When the token cannot distinguish the principal from the AI agent based on the delegation indicator and caller, the executor performs the check.

For more on EIP7702, see the following article.

Applying all three paths to the same operation may record usage multiple times. Choose one execution site based on whether the asset contract can be modified and whether the AI agent can be identified from the caller.

Three locations for integrating AI agent mandate checks

All three approaches refer to the same mandate ledger, but choose one location through which the actual operation passes.

Why eligibility is not rechecked at execution time

Principal eligibility is checked during mandate registration and extension. Querying the compliance provider for every execution of a valid mandate could simultaneously halt previously registered asset operations if the provider goes offline or makes improper updates.

This does not mean expired or revoked identity verification can be ignored. When the compliance provider emits a revocation event, a monitoring service freezes the principal. If the token has its own eligibility checks, those must also pass at execution time.

Compatibility

Relationship with existing tokens

ERC8226 does not add functions to ERC20, ERC721, or ERC1155. AI agents still call the existing transferFrom, with the token or execution contract adding a mandate check.

Adding a strict gate to the asset contract also requires mandates for ordinary spenders other than the principal. To preserve existing allowance behavior, a selective gate can check only callers that have a mandate record. This design distinction directly affects compatibility with existing applications.

ERC165 uses interface IDs to determine whether a target contract implements the required interface. Applications connecting to a mandate registry or compliance provider can use these values to identify supported functionality. This mechanism allows mandate registries and compliance providers to declare their supported interfaces. The result of supportsInterface indicates whether the contract being called supports the required interface.

For more on ERC165, see the following article.

If AI agent registration information is needed, retrieve the registered address and owner from a separate registry. ERC8004 handles AI agent registration and evaluation, but does not store mandates from asset holders. Read AI agent registration and trust information from ERC8004, using the registered agent identity to verify registration independently of trading authority.

For more on ERC8004, see the following article.

Common foundation for signed operations and related standards integrated as needed

The signature path uses EIP712 as a common foundation, while token implementations integrate with mandate execution. Contract wallets, AI agent registration, and external eligibility checks are combined only when required by the integration.

Boundaries of the draft specification

ERC8226 is a Draft as of October 2026. New values can be appended to ReasonCode and MandateReason, so implementations that branch based on numeric ranges or ordering will not accommodate future additions. Handle identifiers explicitly and fail safely on unsupported values.

The reference implementation is also under development and is not presented as a finished product satisfying every specification requirement. Before adoption, recheck the latest specification, code, and audit status.

Reference implementation

The official reference code separates principal eligibility, mandates, token-side gates, and an executor that forwards calls to existing assets into distinct contracts. This separation makes it possible to trace where conditions are stored, in what order they are checked, and which updates roll back when failures occur.

Contract architecture of the ERC8226 reference implementation

AgentMandate

The AgentMandate contract is the authoritative ledger for mandates. Rather than packing everything into one mapping, it stores the mandate, permitted actions, action list, representatives, freezes, and nonces separately.

Storage structure and roles

The _mandates mapping stores the mandate for each triplet. For constant-time action checks at execution time, the _actionEnabled mapping stores a boolean for each action label. The _enabledList array also retains the same labels in enumerable form so that previous actions can be cleared on re-registration.

The _operatorApproved mapping stores representatives per principal. _frozen and _frozenPrincipal separate AI agent and principal freezes, while nonces prevents replay of principal signatures. This division of storage is specific to the reference implementation, but clearing old actions, checking permitted actions at execution time, and storing signature nonces are specification requirements.

Mandate registration flow

grantMandate first checks the compliance provider address, validity period, and existing mandate. It then verifies the principal's direct call or signature and obtains eligibility and the reassessment deadline through checkPrincipal. If this fails, no mandate or action label is stored.

When every check passes, _clearActions reads the old labels from the list and removes them from both the mapping and array. The contract then stores the mandate with zero cumulative usage and a non-revoked state, and writes the new action labels to the mapping and array. Finally, emit MandateGranted and an ActionEnabled event for each action.

Modifying and suspending mandates

extendMandate checks the principal's or representative's authority and queries the compliance provider again for eligibility. It updates only the end time and does not modify cumulativeUsed. Because extensions do not restore consumed allowances, additional allowance requires revocation and re-registration.

revokeMandate sets revoked to true without deleting the record. Freeze functions, by contrast, update the AI agent or principal mapping without modifying individual mandates. Every operation reverts if authority, signature, or target record checks fail, leaving no storage changes or event logs.

Checking execution eligibility and recording usage

The internal _evaluate function reads stored values in the order defined by the standard and returns the first MandateReason. It does not call external contracts, checking only the mandate, freezes, actions, and caps, so it does not modify storage during evaluation.

recordExecution verifies the caller's recording authority and then reuses _evaluate. Only if permitted does it increase cumulativeUsed and include the updated value in the ExecutionRecorded event. If subsequent token processing or an external call reverts within the same transaction, this update also rolls back.

Signatures and public interfaces

Signature verification uses OpenZeppelin's SignatureChecker to verify EOAs and ERC1271-compatible wallets through the same path. Expired signatures, reused nonces, and invalid signatures cause a revert before storage. The EIP712 domain separator is exposed so that applications creating signatures can match the chain and contract used for verification.

supportsInterface checks ERC165 interface IDs. Read functions retrieve mandates, permitted actions, representatives, freezes, and nonces. When no value exists, Solidity default values are returned, so callers check mandate existence using the principal address.

ComplianceProvider

The ComplianceProvider contract stores the identity verification reference, expiry, revocation status, and reason in a Record per principal address. In the reference implementation, only the owner performs registration and revocation.

Registering and querying eligibility

grantPrincipal receives a nonempty identity verification reference and an expiry, replaces the Record, and emits PrincipalGranted. revokePrincipal marks a valid record as revoked, stores the reason, and emits PrincipalRevoked.

checkPrincipal checks for an unregistered principal, revocation, reference mismatch, and expiry, in that order. If any condition applies, it returns false and the reason. If all checks pass, it returns true, COMPLIANT, and the expiry. This read function does not modify stored values.

Differences between the specification and reference code

The specification prohibits bringing forward the reassessment deadline while the principal remains eligible. However, the reference implementation under development replaces the record in grantPrincipal without comparing the existing deadline with the new one. Consequently, using the reference code unchanged in production would not satisfy this requirement.

The specification also requires a revert if eligibility cannot be evaluated. The reference implementation reads only stored records and does not implement a branch for external identity verification system outages. Implementations connected to external systems must distinguish ineligibility from an inability to evaluate.

AgentExecutor

The AgentExecutor contract forwards operations on behalf of the principal when existing asset contracts cannot be modified. Its constructor fixes the mandate registry, principal, and configuration administrator, and stores the quantity position for each action selector in a mapping.

Preparing action definitions

The administrator uses setAction to register the function selector, whether a quantity argument exists, and its argument position. The reference implementation's ActionSpec struct stores whether the action is registered, whether it has a quantity argument, and which argument contains that quantity. The ActionConfigured event retains values that can be used to audit the configuration. Unregistered selectors cannot be forwarded.

_amountArg reads the quantity at the configured position from the 32-byte arguments following the 4-byte function selector. If calldata is too short, it reverts with InvalidData. Actions without a quantity are checked against the mandate using zero.

External calls and rollback

execute extracts the selector and quantity from calldata and calls canExecute. Once authorized, it first updates cumulative usage through recordExecution and then calls the target contract.

If the external call reverts, the entire transaction reverts with CallFailed. Because the earlier cumulative usage update is part of the same transaction, the consumed allowance is rolled back as well. However, the reference implementation returns the external call's return data unchanged and does not treat a token's false return value as failure. For assets that return false instead of reverting, the cumulative usage recorded earlier may remain even though the asset operation did not succeed. Execution sites supporting such assets must also check the return value and revert on failure. The use of ReentrancyGuard and this execution order are specific to the reference implementation.

RamsGated

The RamsGated contract is a base contract for integrating mandate checks into functions of modifiable tokens. Its constructor fixes the mandate registry address.

Integrating the gate into token functions

The gatedByMandate modifier treats an operation as an AI agent operation only when the caller differs from the principal. Before the original token operation, it calls canExecute and reverts with MandateBlocked if there is a denial reason.

If authorized, it executes the original function and calls recordExecution after success. If recording fails, the original transfer or approval is rolled back too. For direct calls by the principal, it performs neither a mandate check nor usage recording.

RamsGatedURWA20

The RamsGatedURWA20 contract demonstrates a strict gate integrated into an ERC7943-compatible test token. For all three target functions, callers other than the principal need an ERC8226 mandate.

Existing authorization conditions differ by operation. transferFrom also consumes allowance, while approveFor directly sets the principal's allowance. mintFor additionally requires the MINTER_ROLE granted by the issuer. Meanwhile, mint, burn, forcedTransfer, and setFrozenTokens do not pass through the mandate gate and are authorized by token-specific roles.

Recorded quantities differ across the three operations

transferFrom records the transferred quantity, approveFor records the approved quantity, and mintFor records the minted quantity in cumulative usage. Even when the same mandate registry is used, the meaning of the recorded quantity differs by operation. Consequently, the cumulative value cannot be interpreted as the principal's net transferred quantity or profit and loss.

If the original token function reverts due to eligibility, balance, or allowance, no mandate usage is recorded either. Conversely, if recordExecution denies an operation after the original processing, the token-side updates also roll back.

How a strict gate changes existing permissions

A strict gate requires a mandate whenever the caller differs from the principal. Therefore, even ordinary spenders who are not AI agents are rejected with NONEXISTENT unless they have a mandate in addition to an allowance.

A token that needs to preserve existing spender behavior can choose a design that gates only callers with a mandate record. Even in that case, revoked records must be retained because deleting them would restore access through the ordinary path.

Foundry tests

The reference implementation includes Foundry tests for each contract. The AgentMandate tests cover registration, signatures, extension, revocation, freezing, and limits as one lifecycle. The ComplianceProvider tests check registration, revocation, and the response for expired eligibility.

The AgentExecutor tests cover action configuration, extraction of quantities from calldata, mandate rejection, and rollback after external call failure. The RamsGatedURWA20 tests verify that transfers, approvals, and minting record different quantities and that direct operations by the principal are not recorded. These tests establish the reference code's behavior, but do not guarantee an audit or legal compliance in individual jurisdictions.

Security considerations

Trust boundaries separating registration and extension from execution

Security does not reside in a single contract alone. Separate registration and extension from execution, and examine the distinct failures and operational risks at each boundary.

Exhaustion attacks through execution recording

If anyone can call recordExecution, they can exhaust the cumulative allowance without moving any assets. Restrict callers to the target asset, the principal's execution environment, or addresses with dedicated recording authority. Recheck execution eligibility during recording as well, so unauthorized operation quantities are not added. The updated cumulativeUsed is the stored value determining the remaining allowance for legitimate operations. Compromise of an address with recording authority enables the same attack, so audit recipients of RECORDER_ROLE and revoke authority that is no longer needed. When a cap violation causes a revert, neither the cumulative value update nor the ExecutionRecorded event remains.

Revocation of identity verification and freezing

There is a delay between the compliance provider revoking a principal's eligibility and the mandate registry freezing the principal. In operations requiring high confidentiality, monitor PrincipalRevoked events and automatically freeze the affected principal. When an executor operates on an unmodifiable asset, the token-side recheck is absent, so also use short mandate validity periods. The monitoring service uses the event's principal to call freezePrincipal and suspend all mandates granted by that principal. If a subsequent investigation finds no issues, the freeze can be lifted. However, do not extend mandates unless eligibility has been restored. As long as the two on-chain operations are separate, the delay between event finality and the freeze transaction cannot be eliminated.

Missing authorization checks

Functions without a mandate gate can execute using only ordinary allowances or operator approvals. Identify every function that an AI agent can call on behalf of the principal and apply the same check to all of them. Even one omission creates a path that bypasses the mandate conditions. The reference implementation explicitly applies the gatedByMandate modifier to target functions. Adding a new contract function does not automatically gate it, so use reviews and tests to detect missing gates. If an operation succeeds through an ungated function, it is not recorded in the mandate's allowance or cumulative usage, and the bypass cannot be detected from the registry alone afterward.

Trust boundaries at each execution site

A token-side gate can directly compare the caller and transfer source. With EIP7702, however, the token sees the principal's address as the caller, so the principal's execution code identifies the original AI agent. With an independent executor, the administrator must register action selectors and quantity argument positions correctly.

Incorrect configuration can cause a mismatch between the quantity checked under the mandate and the quantity actually executed. For each execution site, establish who determines the AI agent, principal, action label, and quantity. An optional IAgentExecutor implementation configures which calldata position to read as the quantity using amountIndex. An incorrect position can allow a smaller unrelated argument to pass the cap check while a larger quantity is passed to the target contract. Compare ActionConfigured events with the actual function ABI and restrict configuration authority to a limited set of addresses.

Why revoked records must be retained

When a selective gate determines whether to apply the gate based on the existence of a mandate record, deleting a revoked record is dangerous. After deletion, the caller may be classified as an ordinary spender without a mandate and fall through to the allowance-only path. Retain the revoked record and audit event, and deny execution with REVOKED. Setting the record's revoked flag to true preserves both existence and revocation checks. When re-registering, clear old action labels and replace the record with a new mandate starting at zero cumulative usage. Even when retaining the ordinary spender path, test that revocation does not increase permissions.

Compliance provider outages and compromise

If the compliance provider goes offline, registration of new mandates and extension of existing mandates stop. Because existing mandates are not rechecked at execution time, existing operations do not stop immediately.

If the compliance provider is compromised, it may register an ineligible principal as eligible. Audit the provider's update authority, introduce delays for changes, and layer token-side eligibility checks with mandate registry freezes. The specification calls this provider a compliance provider. extendMandate also queries the same provider, so expiry cannot be extended during an outage. Not rechecking existing mandates at execution time preserves availability, but it does not automatically detect compromise.

Identifying AI agent addresses

Using one wallet as both an ordinary investor address and an AI agent address can cause integrations to misidentify its role. An AI agent registry verifies control of the key and records an event indicating registration as an AI agent. The token or executor uses that registration information to determine which addresses to treat as AI agents. The agent wallet discussed by the specification can also be used as an ordinary investor address, so its role cannot be distinguished from the address format alone. Verify proof of key control during registration to prevent third parties from registering an address as an AI agent without authorization. Which registry to trust remains outside ERC8226, so integrations audit registration authority and events.

Separating administrators and enforcement operators

Administrators grant and revoke enforcement operator authority; enforcement operators freeze AI agents and principals. Giving both roles to the same address allows the enforcement operator to retain or expand its own authority. The reference implementation rejects overlap between administrators and enforcement operators and records the actor in freeze events. Under the specification, the admin role manages role assignments, and the enforcer performs only freezing and unfreezing. Separate the keys into different custody and approval flows, and monitor role assignment and freeze events. Role separation does not eliminate the risk of individual key compromise, so prepare emergency revocation procedures and permission inventories.

Do not use supplementary information in eligibility decisions

metadata is an optional 32-byte reference to legal documents. The mandate registry does not validate the referenced contents, so it does not use them to determine execution eligibility. Execution eligibility depends on the signed period, actions, and caps, together with the on-chain freeze status, revocation status, and cumulative usage. The reference implementation also treats metadata as non-normative supplementary information. If the referenced content becomes unavailable or is replaced, the on-chain mandate conditions remain unchanged. If legal document authenticity or retention is required, establish separate hash verification and storage policies.

Conclusion

ERC8226 records the authority an identity-verified asset holder grants an AI agent in terms of the target asset, actions, validity period, and per-transaction and cumulative caps. By checking the mandate registry and token-specific conditions separately and finalizing asset processing and usage recording in the same transaction, the authorized scope can be enforced at execution time. Because this is a draft standard with a reference implementation under development, production adoption requires checking the latest specification, implementation differences, audits, and jurisdiction-specific requirements.

The official ERC8226 specification and reference implementation are available below.

I also publish articles elsewhere, which you are welcome to explore.

I was planning to publish a book on specification-driven development with LLMs, titled LLM-Powered Specification-Driven Development. It covers hands-on exercises, how LLMs change development, and practical tips.