Skip to content

Account Abstraction

Understand Ethereum account abstraction through ERC-4337 smart accounts, EntryPoint versions, UserOperations, bundlers, paymasters, nonce lanes, validation, execution, EIP-7702 delegation, fees, and recovery risk.

Updated

For educational purposes only; not investment advice. Investing may result in loss.

Direct answer

Account abstraction makes an account’s authorization and execution rules programmable. On Ethereum, ERC-4337 implements this without changing the consensus transaction type: a wallet sends a UserOperation through dedicated RPC infrastructure, a bundler wraps one or more operations in a normal transaction to a versioned EntryPoint, and the smart account validates and executes its own operation. Recovery, passkeys, session keys, spending limits, batching, and fee sponsorship are account or service features built on that flow, not automatic ERC-4337 guarantees.

This is distinct from ERC-1271, which standardizes how a contract validates a signature on a message, and EIP-7702, which lets an externally owned account (EOA) delegate execution to code. These mechanisms can interoperate, but they do not share one interface, nonce, deployment, or security model. Account abstraction does not eliminate credentials, gas costs, contract risk, or the need to verify the exact chain and implementation.

Seven-step ERC-4337 flow

  1. Pin the environment: chainId, smart-account implementation and upgrade controls, factory, EntryPoint version, address and deployed code hash, bundler support, and whether the chain activates EIP-7702. An address valid for one EntryPoint release or chain is not a universal constant.
  2. Build the version-matched operation. Current logical fields include sender, nonce, factory, factoryData, callData, callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, maxPriorityFeePerGas, optional paymaster fields, and signature. On-chain, EntryPoint receives a packed representation; target calls are encoded inside account-defined callData rather than a universal target field.
  3. Bind authorization to the correct domain. The userOpHash covers the operation except its signature and binds the EntryPoint and chain, preventing reuse across those domains. The account’s validateUserOp checks its owner, multisignature, passkey, session, or other policy. ERC-1271 isValidSignature is a separate contract-signature interface; an optional aggregator can validate aggregated signatures. An EIP-7702 authorization tuple is supplied separately from the UserOperation.
  4. Prove fee capacity. The account can prefund through its EntryPoint balance, or a paymaster can conditionally accept liability from its own deposit. A paymaster may sponsor the user, charge a token, enforce allowlists or quotas, and run postOp; none of those commercial rules is fixed by ERC-4337. Stake and deposit are different: stake supports validation and reputation rules, while deposit pays gas.
  5. Estimate and submit through ERC-7769 RPC. A bundler validates on receipt, again before selection, and again at bundle construction. ERC-7562 restricts validation-stage opcodes and storage access and supports reputation controls against denial-of-service behavior. This simulation checks admission and fee safety; separate full-call simulation is needed to forecast business execution.
  6. The bundler calls handleOps. EntryPoint performs any permitted deployment, account and paymaster validation, prefund checks, and optional aggregation before execution. A failed validation prevents that operation from executing. A target call can still revert after valid admission and consume gas. Whether calls inside one account batch revert atomically or permit partial success is defined by the account’s execution code.
  7. Reconcile receipts and state. Match the UserOperation receipt, underlying bundle transaction, EntryPoint events, account deployment, target events, actual gas, token charge, refund, and final balances. Then monitor nonce lanes, owner and recovery changes, session-key revocation, modules, implementation upgrades, bundler and paymaster alternatives, reorgs, and migration or EIP-7702 redelegation.

Four worked examples

  • Simplified gas envelope. An operation budgets 120,000 execution gas, 90,000 account-verification gas, 45,000 paymaster-verification gas, 40,000 pre-verification gas, and 30,000 paymaster post-operation gas: 120,000 + 90,000 + 45,000 + 40,000 + 30,000 = 325,000 gas. At maxFeePerGas = 30 gwei, the simplified cap is 325,000 × 30 gwei = 0.009750 ETH. If actual chargeable use is 210,000 gas at 22 gwei, cost is 0.004620 ETH. EntryPoint-version rules, unused-gas penalties, L1 data fees, and rollup pricing can add or reclassify amounts, so this is a budget ledger, not a universal prefund formula.
  • Parallel nonce lane. With a 192-bit key and 64-bit sequence, key 7 and sequence 42 encode nonce = (7 << 64) | 42 = 129127208515966861354 = 0x7000000000000002a. After successful inclusion, that lane expects sequence 43; replaying 42 fails. A different key can have an independent sequence, subject to the account logic and bundler rules.
  • Paymaster capacity. A paymaster has 0.50 ETH deposited and each accepted operation needs a maximum guarantee of 0.03 ETH. It can cover floor(0.50 / 0.03) = 16 such operations, reserving 0.48 ETH and leaving 0.02 ETH. A seventeenth operation needs more deposit or a smaller guarantee. Paymaster stake cannot replace this fee deposit.
  • Execution revert after admission. An operation reserves up to 0.0060 ETH; validation succeeds, but the target execution reverts after consuming 180,000 gas × 25 gwei = 0.0045 ETH. The target state changes revert, yet the account or paymaster still owes 0.0045 ETH; the unused 0.0015 ETH remains subject to the applicable settlement and penalty rules. A successful bundler simulation therefore does not promise business success, inclusion, or finality.

Risks and controls

  • Wrong chain, EntryPoint address, release, or deployed code hash can invalidate or misroute an operation.
  • A signature missing chain or EntryPoint domain binding can enable replay.
  • Factory, counterfactual address, initialization data, or deployment salt can be substituted or miscomputed.
  • EIP-7702 delegation can point an EOA at malicious or vulnerable code with broad account authority.
  • Initialization front-running or repeat initialization can seize or corrupt an account.
  • Proxy upgrades or EIP-7702 redelegation can collide with existing storage layout.
  • A compromised upgrade administrator or module manager can replace account behavior.
  • Owner, multisignature, passkey, or ERC-1271 validation bugs can authorize theft or lock funds.
  • Recovery thresholds, delays, guardians, and cancellation paths can fail or be captured.
  • Session keys can exceed intended target, token, amount, duration, or function scope.
  • Nonce lanes can collide, gap, replay, or block dependent operations.
  • Aggregator outage or signature-aggregation defects can strand otherwise valid operations.
  • Bundlers can censor, go offline, apply different local policy, or reject alternative-mempool rules.
  • Public UserOperation flow can expose intent to front-running, correlation, and MEV.
  • Validation can pass before state changes make the operation invalid at bundle construction.
  • Paymaster policy can reject service, its deposit can deplete, or postOp can fail.
  • Token-denominated gas charges can include exchange-rate risk, allowance risk, spread, and service markup.
  • Underestimated gas can revert; excessive limits can increase reservation or penalty exposure.
  • Account batch semantics can permit partial success when the user expected atomic rollback.
  • Target-protocol bugs, hostile front ends, chain reorgs, and weak finality remain outside account abstraction.

Common misconceptions

  • “Account abstraction removes private keys.” It changes programmable credential policy; some credential must still authorize actions.
  • “A paymaster makes gas free.” Native gas is still paid, and the user, sponsor, or service ultimately bears the cost.
  • “Bundler simulation guarantees success.” Admission simulation does not guarantee execution, inclusion, or finality.
  • “ERC-1271, ERC-4337, and EIP-7702 are the same interface.” They solve different signature, transaction-flow, and delegation problems.
  • “Every chain, wallet, and EntryPoint is compatible and safer.” Support, versions, deployments, code, modules, and controls must be verified separately.

Sources

Navigation

Search the wiki...