EIP-7702 (Set EOA Account Code)
A proposal letting a normal account adopt contract code for one transaction, bridging old and smart accounts.
Basically
EIP-7702 lets your Ethereum account use smart contract features without moving to a new address. You sign permission for this and can change or remove it later.
Key Takeaways
- EIP-7702 lets any Ethereum externally owned account (EOA) temporarily delegate its execution to a smart contract. You gain features such as transaction batching, gas sponsorship and session keys without migrating to a new address.
- EIP-7702 was activated in the Pectra upgrade in May 2025. It replaced the earlier EIP-3074 proposal and is designed to be forward-compatible with account abstraction under ERC-4337.
- Delegation is opt-in and revocable. An EOA signs an authorisation tuple pointing to a delegate contract and can remove or change that delegation at any time with a new transaction.
What Is EIP-7702?
EIP-7702, formally titled "Set EOA Account Code," is an Ethereum protocol upgrade that allows externally owned accounts to adopt smart contract code. Before EIP-7702, Ethereum had two rigid account types: EOAs controlled by a private key could sign transactions but could not run code, while contract accounts could run code but could not initiate transactions. EIP-7702 bridges this gap by letting an EOA point to a smart contract wallet implementation and execute its logic as if the EOA itself were that contract.
Vitalik Buterin proposed EIP-7702 in May 2024 as a pragmatic replacement for EIP-3074. EIP-3074 introduced AUTH and AUTHCALL opcodes but raised compatibility concerns with the existing ERC-4337 smart account ecosystem, while EIP-7702 uses a new transaction type that writes a delegation pointer into the EOA's code field instead of adding new opcodes to the EVM.
The Pectra network upgrade included EIP-7702 and activated on Ethereum mainnet on May 7, 2025. Pectra, a portmanteau of Prague and Electra, the execution and consensus layer names, was one of Ethereum's largest upgrades, and EIP-7702 was its headline feature for wallet user experience.
How It Works
EIP-7702 introduces a new transaction type, type 0x04, called a "set code transaction", which carries an authorisation list alongside the standard transaction fields. Each entry in that list is a signed tuple that grants delegation from a specific EOA to a specific contract address.
The Authorization Tuple
Each authorisation in the list follows the format [chain_id, address, nonce, y_parity, r, s]. Every field serves a distinct purpose.
The signature covers keccak256(0x05 // rlp([chain_id, address, nonce])), where 0x05 is a magic byte distinct from the transaction type byte. The separate byte prevents cross-context signature reuse.
The Delegation Designator
The EVM writes a 23-byte delegation designator into the EOA's code field when it processes a valid authorisation: 0xef0100 // <20-byte contract address>. EIP-3541 reserved the 0xef prefix as an invalid leading opcode, so the EVM can reliably distinguish a delegation pointer from regular bytecode.
The EVM detects this prefix when any subsequent operation calls the EOA, loads the bytecode from the referenced contract and executes it in the context of the EOA. The delegate code operates on the EOA's balance, storage and address. Other contracts therefore see the EOA behaving like a smart contract.
EIP-7702 vs. ERC-4337 vs. EIP-3074
EIP-7702 exists alongside two other account abstraction approaches. Each approach has different tradeoffs.
ERC-4337 deploys a dedicated smart contract wallet at a new address and processes UserOperations through a separate mempool and EntryPoint contract. It requires no protocol changes but means users must migrate to a new address, whereas EIP-7702 lets users keep their existing EOA address and gain smart wallet features through delegation.
The two approaches are complementary, not competing. Users who already have an ERC-4337 smart wallet continue using it, while users who want to keep their existing EOA address and add smart wallet capabilities use EIP-7702. Most production wallet stacks now support both paths.
Transaction Batching
An EOA without EIP-7702 must submit separate transactions for each on-chain action: one to approve a token, another to swap it and a third to stake the result. With EIP-7702, the EOA delegates to a smart wallet contract that can execute all three operations atomically in a single transaction. The entire batch reverts if any step fails.
Gas Sponsorship
A relayer or paymaster can pay the gas fee on behalf of the EOA holder because a third party can submit the authorisation tuple. The EOA signs the authorisation offline, the sponsor submits the type-0x04 transaction and pays gas, and the EOA's delegation is set without the user needing ETH in their account. Gasless onboarding flows can therefore let new users interact with dApps before acquiring ETH.
Session Keys
An EOA can grant temporary, scoped permissions to a sub-key by delegating to a contract that implements session key logic. A gaming dApp could, for example, receive a session key authorised to spend up to 0.01 ETH per transaction for the next 24 hours without the user approving every action. The delegate contract enforces these constraints on-chain.
Social Recovery and Key Rotation
EOAs have historically been irrecoverable: lose the private key, lose the account. With EIP-7702, an EOA can delegate to a contract that implements social recovery logic, allowing a set of guardians to rotate the controlling key if the original is lost. Dedicated smart contract wallets were previously the only way to do this.
Programmable Spending Policies
Delegate contracts can enforce arbitrary spending rules: daily transfer limits, whitelisted destination addresses, time-locked withdrawals or multi-party approval for large transfers. These policies apply at the protocol level, not just in the wallet UI, making them resistant to compromised front-ends.
Phishing and Malicious Delegation
Delegation phishing is the most significant risk introduced by EIP-7702. If an attacker tricks you into signing an authorisation tuple pointing to a malicious contract, the attacker gains persistent execution control over the EOA. Unlike a token approval, which only exposes one asset, a malicious delegation can drain the entire account: ETH, all ERC-20 tokens and NFTs.
Research has documented real-world exploitation of this vector. A single signed authorisation can convert an EOA into a permanent proxy resolving to attacker-controlled logic. Wallets must clearly communicate what an authorisation tuple does before prompting the user to sign, and users should only delegate to audited, well-known contracts.
Cross-Chain Replay
Authorisation tuples with chain_id set to 0 are valid on any EVM-compatible chain. An attacker who obtains such a signature can deploy a malicious contract at the same address on a different chain and use the replayed authorisation to take control of the EOA there. Users and wallets should avoid chain-agnostic authorisations unless explicitly required.
Persistent Delegation
The code designation written by EIP-7702 persists across transactions until explicitly revoked, unlike the original description suggesting "temporary" delegation. If you delegate to a contract and forget about it, all future interactions with that EOA will route through the delegate code. You must actively manage your delegation state.
Smart Contract Risk
The security of a delegated EOA depends entirely on the delegate contract. A bug in the delegate code, an upgrade to a malicious implementation if the delegate is a proxy contract, or an exploit in its access control logic can compromise all EOAs that have delegated to it, concentrating risk in a way that traditional EOAs do not face.
Why It Matters
EIP-7702 represents Ethereum's pragmatic bridge between the simplicity of EOAs and the power of smart accounts. Rather than forcing a binary choice between keeping your existing address or gaining programmable wallet features, EIP-7702 lets every EOA opt into smart contract functionality on demand. It lowers the barrier to account abstraction adoption by removing the migration cost that has slowed ERC-4337 uptake.
The broader ecosystem gains user-friendly features like gas sponsorship and session keys for every existing Ethereum account through EIP-7702. Payment applications and embedded wallets benefit particularly because onboarding friction must be minimal. For a deeper technical analysis, see the EIP-7702 code delegation research article and the Pectra upgrade wallet impact analysis.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.