ERC-7902 Account abstraction wallet feature extension (Wallet Capabilities for Account Abstraction)
Draft · Accounts & wallets · created 2025-03-01
Lets an app request, via EIP-5792 capabilities, that a wallet apply an expiration time limit, nonce key, paymaster sponsorship, atomic execution, recent root verification, and post-condition checks to an EIP-8141 frame transaction.
Why it is needed
EIP-8141 splits a transaction into multiple frames, and the wallet alone decides how many frames to create, what verification to do, who pays the gas, and what to check after execution. But some of these choices depend on information that only the app (dApp) has. An app may want to use different nonce keys for mutually independent transactions, may already know a specific root value used in an on-chain proof, may know a paymaster that will cover gas on its behalf along with that paymaster's data, and may know which calls must succeed together. Between a wallet and an app connected via EIP-5792, there is no standard way to convey these details, so the app has no choice but to rely on whatever the wallet decides arbitrarily, and does not get the guarantees it wants.
In depth
Call Dispatch
By default, the wallet decides which frame holds each call. A SENDER-mode frame wraps the call as is and has the sender account execute it directly, while a DEFAULT frame calls the account's execution function with calldata. For an account with neither code nor an EIP-7702 delegation, the EIP-8141 default code makes no call at all in a DEFAULT frame, so such accounts must use a SENDER frame. Whichever form is used, the wallet must preserve the order used in the request, and if atomicRequired is true, it must execute all calls atomically.
eip7702Auth
A capability that checks whether an account is delegated to the implementation specified by delegation (an address or a name the wallet knows). If the target differs, the wallet signs and submits a separate EIP-7702 set-code transaction first; this transaction is not included in atomicRequired's atomicity, and its logs are not reported as logs of the call. If account is an account the user has not connected, or an account whose code is not an EIP-7702 delegation designator, the wallet must reject the request.
validityTimeRange and recentRoots
validityTimeRange sets an expiration time limit by adding, as the transaction's first frame, an expiry_verify frame holding validUntil as an 8-byte big-endian integer. recentRoots bundles sourceId, slot, root tuples into a single recent_root_verify frame, and each slot must be lower than the current slot and within RECENT_ROOT_USABLE_WINDOW. If both are present, expiry_verify comes first, followed by recent_root_verify.
keyedNonce
Specifies the nonce key from EIP-8250. nonceKeys may contain up to 16 entries, must be in strictly increasing order, and is rejected if empty. All selected keys must share a single sequence number; if nonceSeq is omitted, the wallet reads and uses the current sequence, and if 0xffffffffffffffff is given, it becomes single-use, meaning those keys cannot be used again after the transaction. The state gas incurred when using a new key must be included in the fee estimate.
paymasterFrame
In the static form, the app directly supplies paymaster, data, and executionGasLimit, while in the service form, the wallet uses url and context to call frame_getPaymasterData (stub data) and frame_getPaymasterSignature (final signature) in two separate calls. The pay frame must come after the sender verification frame, with mode VERIFY and flags APPROVE_PAYMENT (0x1), and the paymaster signature is added as a separate entry in the transaction's signatures list. This capability cannot be marked optional, and the wallet must not send a transaction without a pay frame.
atomicFramesBatch and callFrame
atomicFramesBatch groups adjacent calls that share the same id using ATOMIC_BATCH_FLAG so that they all succeed or all roll back together. This capability cannot be used together with a request where atomicRequired is true. callFrame directly specifies an individual call's frame as SENDER or DEFAULT. For DEFAULT, value must be 0 and to must be the sender account itself, and if the wallet cannot build the requested frame, it must reject the request regardless of whether the capability is optional.
outcomeAssertions and frame order
outcomeAssertions appends an ASSERT frame after the calls, in the manner defined by the format name (assertionsFormat). The wallet must reject an unsupported format, and cannot drop or reorder requested frames. The overall frame order is fixed as [expiry_verify] [recent_root_verify] [deploy] <sender verification> [pay] <call frames> [ASSERT frames], and the request is rejected if it exceeds MAX_FRAMES.
Call status computation and proposal status
wallet_getCallsStatus aggregates the per-frame status (1 success, 0 failure, 2 skipped) to assign the batch status. It is 200 if all call frames are included and there is no ASSERT failure, 500 if no calls were included at all or an ASSERT fails, and 600 if only some are included. This proposal is in Draft status, meaning it is still a draft whose specification may change or stall.
Things to watch out for
- eip7702Auth is the riskiest capability: Wallets must maintain a strict allowlist of implementations permitted for delegation, and the name and version shown must be bound to that list's address. A vulnerability or malicious code in the delegated target can drain the entire account. Because delegation is a separate transaction, it takes effect even if the call is later rejected or fails, so wallets must have delegation confirmed separately from the call and show the user both the current and new implementation and version.
- Risk of paymasterFrame signature reuse: A paymaster signature over a msg-specified digest is valid for any transaction that accepts that digest, so the digest must bind the sender, the nonce key and sequence number, and an expiration. Otherwise anyone who has seen the signature can reuse it. Sponsor information is an unverified value supplied by the service, so wallets must not present it as if it were verified.
- Cost and single-use risk of keyedNonce: Nonce keys are public and permanent, and each new key incurs state gas, with cost accumulating up to 16 keys. A single-use key is consumed at the moment settlement is approved, so it cannot be reused even if a later frame or ASSERT fails. Wallets must warn on requests that combine a single-use key with outcomeAssertions.
- ENTRY_POINT vs tx.origin difference in callFrame: In a DEFAULT frame, ENTRY_POINT becomes the caller and executes without the sender's approval, so accounts that treat ENTRY_POINT as an authority are at risk. Also, unlike a SENDER frame, in a DEFAULT frame the ORIGIN for the entire call tree becomes ENTRY_POINT, so contracts that read tx.origin may behave differently.
- outcomeAssertions failure only consumes gas: An ASSERT failure only rolls back the execution body; the verification prefix, such as gas settlement and nonce key consumption, remains in effect. Wallets must reject requests containing assertions they cannot include, and must not substitute their own assertions for the app's assertions.