Overview: Bridging Externally Owned Accounts and Programmable Smart Accounts
Since Ethereum's genesis in 2015, user-facing accounts have been split into two rigid primitives: Externally Owned Accounts (EOAs) controlled by a single secp256k1 private key with zero native code, and Contract Accounts capable of executing arbitrary EVM bytecode but unable to initiate transactions autonomously. While ERC-4337 introduced an out-of-protocol UserOperation mempool and smart account standard in 2023, adoption faced a persistent migration barrier: billions of dollars in assets, protocol permissions, ENS names, and historical reputations remained anchored to existing EOA addresses that could not execute batched calls, enforce session keys, or sponsor gas natively.
Authored by Vitalik Buterin, Sam Wilson, Ansgar Dietrichs, and Matt Garnett (lightclient), and activated on Ethereum mainnet via the Pectra upgrade on May 7, 2025, EIP-7702 (Set Code for EOAs) resolves this divide at the protocol layer. EIP-7702 introduces a new EIP-2718 transaction type (0x04, known as SET_CODE_TX_TYPE) that allows any existing EOA owner to sign an authorization pointing their address to a verified smart contract implementation. Without migrating assets to a new address or forfeiting native key control, the EOA temporarily or persistently delegates its execution behavior to smart contract logic.
Crucially, EIP-7702 does not deploy monolithic bytecode into an EOA's state permanently in the style of contract creation. Instead, it writes a compact 23-byte delegation designator into the EOA's code field, preserving backward compatibility with existing wallets, ERC-4337 bundlers, and ERC-7579 modular smart account standards while exposing subtle new security invariants for protocol developers.
Transaction Type 0x04 and the Authorization Tuple Mechanics
EIP-7702 extends Ethereum's typed transaction envelope under EIP-2718 with transaction type 0x04. Alongside standard EIP-1559 fee fields (chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, value, data, and access_list), a Type 4 transaction carries an explicit authorization_list array.
Each entry in authorization_list is a tuple formatted as [chain_id, address, nonce, y_parity, r, s], signed independently by the authorizing EOA (referred to in the specification as the authority):
- Domain-Separated Signing Prefix (
0x05): To guarantee that an EIP-7702 delegation signature cannot collide with legacy transaction signatures, EIP-712 typed data, or EIP-191 personal messages, the authority computes the signing digest using the dedicated magic byte0x05:keccak256(0x05 || rlp([chain_id, address, nonce])). - Chain Scoping via
chain_id: Settingchain_idto a specific network identifier (such as1for Ethereum mainnet) binds the delegation to that single chain. Settingchain_id = 0creates a chain-agnostic authorization valid across any EVM network supporting EIP-7702, enabling multi-chain smart account deployment at the cost of broader replay surface. - Authority Nonce Validation: The tuple's
noncemust match the authorizing EOA's current state nonce at the moment the authorization tuple is processed during transaction prologue execution. Once verified, the EVM increments the authority's nonce by1, ensuring single-use replay protection even if the transaction was sponsored and broadcast by a third-party relayer (tx.originneed not equal the authority). - Target Contract
addressand Revocation: Theaddressfield specifies the 20-byte smart contract implementation to delegate to. To clear a delegation and restore the account to pure EOA behavior, the owner signs a new authorization tuple withaddressset to the zero address (0x0000000000000000000000000000000000000000).
Because authorization processing occurs in a loop before transaction execution begins, a single Type 4 transaction can configure delegations for multiple EOAs atomically, or delegate and immediately invoke the newly empowered EOA within the same atomic transaction.
The 0xef0100 Delegation Designator and EVM Opcode Semantics
When a tuple in authorization_list passes signature recovery (ecrecover), chain ID verification, nonce matching, and code-emptiness or existing-delegation checks, the EVM sets the authority account's code to a deterministic 23-byte pointer called the delegation designator:
0xef0100 || address
This design deliberately leverages EIP-3541, activated in the 2021 London upgrade, which banned normal contract deployments (CREATE and CREATE2) from beginning with the byte 0xef. Because no standard smart contract can ever start with 0xef, the three-byte header 0xef0100 serves as an unambiguous protocol-level sentinel: 0xef01 marks a special account extension and 0x00 denotes version zero of the delegation format, followed directly by the 20-byte target contract address.
| EVM Operation or Context | Legacy EOA Behavior | EIP-7702 Delegated EOA Behavior |
|---|---|---|
| Stored Account Code Field | Empty (0 bytes) | 23-byte designator: 0xef0100 || address |
CALL / DELEGATECALL / STATICCALL / CALLCODE |
No bytecode executed; value transfer succeeds | Resolves pointer and executes target contract bytecode in the EOA's storage and balance context |
EXTCODESIZE |
Returns 0 |
Returns 23 (the length of the delegation designator) |
EXTCODECOPY |
Copies 0 bytes | Copies the 23-byte designator 0xef0100 || address, not the target contract's code |
EXTCODEHASH |
Empty hash (0xc5d246...) or 0 |
Returns keccak256(0xef0100 || address) |
Execution Storage & address(this) |
N/A | Reads and mutates the EOA's own state trie storage slots; address(this) equals the EOA |
| Delegation Chaining | N/A | Prohibited: if target address itself has a 0xef0100 designator, resolution stops after one hop |
Importantly, EIP-7702 restricts delegation depth to a single hop. If Contract A delegates to Contract B via a designator, calls targeting the EOA resolve the designator once and stop rather than recursively traversing nested pointers, preventing unbounded pointer-chasing loops and infinite gas griefing.
ERC-4337 Interoperability and Modular Smart Accounts (ERC-7579)
EIP-7702 was explicitly designed to complement rather than replace ERC-4337. While EIP-7702 grants an EOA the ability to borrow contract code, it does not standardize validation interfaces, alternative mempools, or paymaster fee settlement. Instead, delegating an EOA to an ERC-4337-compatible account implementation unlocks the entire Account Abstraction stack for existing addresses:
- Seamless
EntryPointExecution: An EOA carrying an EIP-7702 delegation designator pointing to an ERC-4337 account contract (such as a Safe, Kernel, Biconomy Nexus, or Coinbase Smart Wallet implementation) can submitUserOperationintents directly to ERC-4337 bundlers. TheEntryPoint(v0.7 and v0.8) includes explicit support for aneip7702Authtuple inside UserOperations, letting bundlers inspect the 23-byteEXTCODECOPYprefix to verify authorized account code against mempool validation rules. - ERC-7579 Modular Plugins: By delegating to an ERC-7579 modular smart account core, a user's single EOA can install and revoke hot-swappable modules: time-bounded session keys for on-chain gaming or automated DeFi rebalancing, spending-limit hooks, passkey (WebAuthn / RIP-7212) signers, and multi-factor guardian recovery modules.
- Atomic Call Batching: Operations that previously required two separate signatures and blocks, such as an ERC-20
approve()followed by a decentralized exchange swap or lending deposit, execute inside a single atomicexecuteBatch()call, eliminating residual infinite token approvals.
Token Economics: Gas Accounting, EIP-1559 Burn, and Paymaster Markets
Although EIP-7702 introduces no new protocol token, it directly reshapes Ethereum's gas economics, ETH fee burn under EIP-1559, and ERC-20 gas abstraction markets:
| Economic Parameter | Verified EIP-7702 Specification | Network & Cost Impact |
|---|---|---|
| Transaction Base Intrinsic Cost | TX_BASE_COST = 21,000 gas |
Standard EIP-2718 base transaction overhead paid in ETH (base fee burned via EIP-1559) |
| Empty Account Authorization Cost | PER_EMPTY_ACCOUNT_COST = 25,000 gas |
Charged upfront per tuple in authorization_list to price potential new state-trie creation |
| Existing Account Base Cost | PER_AUTH_BASE_COST = 12,500 gas |
Effective net cost for pre-existing EOAs after refunding 12,500 gas when authority exists in state |
| Calldata & Verification Cost | Standard EIP-2028 / EIP-7623 calldata + ecrecover |
Replaces 40,000 to 200,000+ gas proxy CREATE2 deployment cost with a 12,500 gas pointer write |
| Gas Sponsorship Settlement | Relayer / Paymaster pays L1 ETH gas; settles user in ERC-20 or off-chain fee | Expands ETH base-fee demand via complex smart-account batching while abstracting ETH UX away from end users |
From a tokenomic perspective, EIP-7702 lowers the marginal capital barrier to smart account adoption by an order of magnitude. Deploying a traditional smart contract wallet proxy via CREATE2 consumes roughly 100,000 to 250,000 gas in initialization bytecode and state allocation, whereas setting a 23-byte EIP-7702 delegation designator on an existing EOA costs a net 12,500 gas (plus calldata for the 101-byte tuple). Because the base fee component of every Type 4 transaction is burned under EIP-1559 while priority tips accrue to validators and MEV builders, higher smart-account batching density increases fee-burn efficiency per unit of user intent. Simultaneously, ERC-4337 Paymasters create competitive fee markets in which solvers and paymaster operators absorb ETH gas volatility and collect spreads in stablecoins such as USDC or protocol-subsidized budgets.
Security Architecture, Breaking Assumptions, and Objective Risks
Granting legacy EOAs programmable execution while preserving their original secp256k1 private key introduces nontrivial security risks that both wallet engineers and DeFi protocol auditors must mitigate:
- Persistence of the Root Private Key: Unlike a native ERC-4337 smart account whose keys can be rotated completely away from an initial signer, an EIP-7702 delegated EOA always retains its original secp256k1 private key at the consensus layer. Anyone holding that private key can sign a Type 4 transaction at any moment to override the delegation designator and bypass smart-contract multisig or spending-limit protections. Consequently, EIP-7702 cannot provide trustless multi-party multisig security against a compromised root key unless the key itself is destroyed or held in hardware/MPC custody.
- Initialization Front-Running Vulnerabilities: Because an EOA's code is updated during the Type 4 prologue before arbitrary contract calls execute, a delegated implementation that exposes an unauthenticated
initialize(address owner)function can be front-run in the public mempool. Production EIP-7702 implementations avoid unprotected initializers by verifying an explicit signature from the authority address itself (ecrecover == address(this)) during storage setup or by deriving permissions deterministically without separate initialization transactions. - Storage Layout Collisions Across Re-Delegations: An EOA retains its persistent key-value storage trie even when its delegation designator is switched from Contract A to Contract B or revoked and re-enabled later. If Contract A writes critical variables to storage slot
0and Contract B interprets slot0as an owner address or nonce, catastrophic storage corruption or privilege escalation occurs. Production delegate contracts enforce ERC-7201 namespaced storage layouts (deriving unique pseudo-random storage slots viakeccak256hashes) so upgrades never collide. - Collapse of Legacy
tx.originandextcodesizeChecks: Smart contracts that historically usedrequire(tx.origin == msg.sender)to block flash-loan reentrancy or smart contract callers, or checkedextcodesize(caller) == 0to verify human EOAs, fail under EIP-7702. An attacker's EOA can sign a delegation pointing to a malicious batching contract and still satisfytx.origin == msg.senderwhile executing arbitrary looping sub-calls inside a single transaction. Conversely, protocols checkingextcodesize == 0may falsely reject legitimate human users whose EOAs carry a 23-byte designator. - Cross-Chain Phishing via
chain_id = 0: Malicious dApps attempting to trick users into signing blind EIP-7702 authorizations withchain_id = 0can drain assets across every EVM network simultaneously using a single signature. Leading hardware and browser wallets mitigate this by strictly blocking blind0x05signing payloads, surfacing explicit target-address whitelists, and warning heavily againstchain_id = 0authorizations.
Primary Specifications and Technical References
- EIP-7702 (Set EOA Account Code): Official protocol specification defining Transaction Type
0x04,0x05authorization domain separation,0xef0100delegation designators, and gas constants (eips.ethereum.org/EIPS/eip-7702). - EIP-3541 (Reject 0xEF Starting Code): London-upgrade invariant reserving the
0xefbyte prefix for protocol-level account extensions rather than user-deployed bytecode (eips.ethereum.org/EIPS/eip-3541). - ERC-4337 & ERC-7579 (Account Abstraction & Modular Accounts): Complementary
EntryPointUserOperation bundling, Paymaster sponsorship, and modular plugin standards (eips.ethereum.org/EIPS/eip-4337andeips.ethereum.org/EIPS/eip-7579). - ERC-7201 (Namespaced Storage Layout): Deterministic hash-derived storage slot standard preventing storage corruption across EIP-7702 re-delegations (
eips.ethereum.org/EIPS/eip-7201).
Conclusion
EIP-7702 represents the most pragmatic account abstraction upgrade in Ethereum's history. By introducing Type 4 transactions, the 0xef0100 delegation designator, and gas-efficient 12,500-gas authorization tuples in the Pectra upgrade, Ethereum unlocked batching, sponsored transactions, session keys, and ERC-4337 interoperability for hundreds of millions of existing EOA addresses without forcing address migration. While developers must enforce ERC-7201 namespaced storage, retire fragile tx.origin guards, and respect the root private key's ultimate authority, EIP-7702 permanently bridges legacy wallets and modular smart accounts at the protocol layer.