
Account abstraction and EIP-7702: what changes for web3 apps
The main obstacle to web3 adoption has never been the technology but the user experience: a recovery phrase to keep safe, ETH to buy before doing anything, two signatures for a single action (approve then swap). Account abstraction tackles exactly these problems.
The starting point: EOA versus smart contract
Ethereum historically has two kinds of accounts:
- EOA (Externally Owned Account): controlled by a secp256k1 private key. It can initiate transactions but has no logic: one signature = one transaction, and it pays its own fees in ETH.
- Contract account: it has code, hence logic, but cannot initiate a transaction on its own.
A smart account is a contract acting as a wallet: its code decides what a valid signature is. That enables multisig, spending limits, passkeys, social recovery, or time-limited session keys.
ERC-4337: account abstraction without changing the protocol
ERC-4337 brought smart accounts without touching consensus, through a parallel infrastructure:
- UserOperation: a signed "intent" from the user describing the calls to perform.
- Bundler: a node that groups UserOperations and submits them on-chain in a regular transaction.
- EntryPoint: a single, audited contract that validates each operation (by calling the account's validation logic) and then executes it.
- Paymaster: a contract that agrees to pay fees on behalf of the user, to sponsor gas or charge it in a stablecoin.
The limitation: you needed a new account, hence a new address. Existing users, with their assets and history on an EOA, were left out.
EIP-7702: an EOA that becomes a smart account
Shipped to mainnet with the Pectra upgrade in May 2025, EIP-7702 adds a new transaction type (0x04, "set code"). The owner of an EOA signs an authorization (chainId, contract address, nonce); once included, the account's code becomes a delegation pointer (0xef0100 followed by the address). Calls to the EOA then run that contract's code, while keeping the same address.
- Same address, same assets: no migration.
- ERC-4337 compatible: a delegated EOA can use bundlers and paymasters.
- The private key stays in charge: it can still sign directly and change the delegation. A 7702 smart account alone therefore does not provide recovery if the key is lost.
On the frontend: batched calls (EIP-5792)
For an application, the most visible change is the ability to send several calls with a single confirmation, through the wallet method standardized by EIP-5792. With viem:
import { encodeFunctionData, erc20Abi, parseUnits } from "viem";
import { walletClient, account } from "./wallet";
import { USDC, ROUTER, routerAbi } from "./contracts";
const amount = parseUnits("100", 6); // USDC has 6 decimals
const { id } = await walletClient.sendCalls({
account,
calls: [
{ to: USDC, data: encodeFunctionData({ abi: erc20Abi, functionName: "approve", args: [ROUTER, amount] }) },
{ to: ROUTER, data: encodeFunctionData({ abi: routerAbi, functionName: "deposit", args: [amount] }) },
],
});
const { status, receipts } = await walletClient.waitForCallsStatus({ id });Before using it, query the wallet with getCapabilities to find out whether it supports atomic execution or fee payment by a paymaster, and keep a fallback to separate transactions for older wallets.
Security pitfalls
- "An EOA has no code" is no longer true: contracts that relied on
tx.origin == msg.senderorextcodesize == 0to detect a human are no longer protected. - The authorization is a blank cheque: delegating to a malicious contract hands it full control of the account. Serious wallets only allow signing delegations to known implementations; an app should never ask users to sign an arbitrary delegation.
- chainId set to 0: an authorization signed with a zero chainId is valid on every compatible chain. Keep it for controlled cases.
- Changing delegation: account storage persists across implementations; two implementations with incompatible storage layouts can corrupt each other.
- Initialization: a poorly initialized smart account can be "initialized" by someone else. Rely on audited implementations.
Conclusion
Account abstraction transforms the web3 user experience: sponsored fees, batched actions, passkey authentication. EIP-7702 opens it to existing accounts without changing address. For a frontend developer, that means detecting wallet capabilities, batching calls, keeping a fallback, and never again assuming that a "human" address has no code.