ERC-8199 Sandboxed Smart Wallet

Draft · Accounts & wallets · created 2026-03-19

A wallet standard that lets an agent autonomously operate funds in a dedicated sandbox wallet fully separated from the owner's wallet, while allowing the owner to reclaim assets or cut off access at any time.

Why it is needed

Existing approaches to entrusting a wallet to an agent each have limitations. The session key approach shares the owner's wallet directly, so unless strictly restricted with a whitelist it is hard to block out-of-scope actions, while restricting it too narrowly reduces what the agent can do. TEE-based policy engines are convenient but ultimately rely entirely on trust in centralized hardware and operators. Sharing the account key directly is the most intuitive method, but unless the owner approves every single task, it effectively grants unrestricted access to the entire wallet, which conflicts with the goal of full automation without human intervention. As a result, if the agent malfunctions or is compromised, the owner's entire asset holdings can be put at risk.

What to implement

In depth

Agent / Check / Execution Structs

An Agent consists of agentKey (address), validityTimestamp (packing uint128 validAfter and uint128 validUntil into one slot), and Check[] checkers. A Check consists of a checking contract address `to` and verification condition data `termsData`. An Execution consists of `target`, `value`, and `data`, representing a single call to be performed. Both invokeAgentExec() and executeFromOwner() take an Execution[] array as input and process multiple executions at once.

Agent registration and removal

registerAgents() can only be called by the owner and emits an AgentRegistered event on success. Attempting to register an Agent with the same agentKey that is already active must cause the function to revert. removeAgents() can also only be called by the owner and emits an AgentRemoved event; it must not revert as long as the agentKey exists, even if its validity window has expired or not yet begun.

Agent execution and signatures

invokeAgentExec() is a function that anyone can relay, taking an Execution array together with a signature from the agentKey. The signature can also encode the executable time range. isAgentActive() must return true only when the agentKey is registered and the current block.timestamp falls within the validityTimestamp range.

Checker pre- and post-checks

Checker contracts must implement two functions, preCheck() and postCheck(). Each receives the Execution array and termsData before/after execution respectively, verifies the conditions, and returns success or failure as a bool. The original text recommends whitelist-based enforcement over blacklist-based enforcement when constructing termsData.

One-directional owner control

owner() follows the owner() pattern from ERC-173, improving compatibility with ownership-related tooling and SDKs. executeFromOwner() can only be called by the address returned by owner(), and can perform arbitrary execution including full withdrawal of assets. This creates a one-directional relationship where only the owner wallet can affect the sandbox wallet, while the sandbox wallet has no rights over the owner wallet.

Initial funding transfer method

Initial bootstrapping is done by transferring funds directly from the owner wallet to the SandboxedSmartWallet. A token approval model is not recommended, since it would create a way for the SandboxedSmartWallet to be logically or account-level linked to or able to affect the owner wallet.

Multi-agent sharing and additional benefits

When multiple agents share a single sandbox wallet, they can jointly use the same assets, onchain address reputation, and transaction history. Agents using a smart wallet benefit from gas abstraction, which reduces the burden of native gas requirements, supports onchain conditional execution and multi-layered trading strategies, and helps with parallel execution of many transactions in high-frequency trading environments via mechanisms such as two-dimensional nonces.

Proposal status

This ERC is currently in Draft status, a proposal that has not yet been finalized and whose contents may change or be discontinued.

Things to watch out for

Original ERC · ← ERCs