EIP-7702
EIP-7702 introduces a new transaction type empowering Externally Owned Accounts (EOAs) with smart contract wallet functionality by allowing them to authorize smart contract code at their address for a transaction. This enables EOAs to perform complex operations typically reserved for smart contracts without permanently converting the EOA or changing its address.
Key Features
Batching
Execute multiple operations in a single atomic transaction. A common use case is combining an ERC-20 approval followed by spending that approval. Currently, this workflow requires two separate transactions in decentralized exchanges (DEXes). Advanced batching scenarios may involve dependencies where one operation's output serves as another's input, streamlining complex workflows.
Gas Sponsorship
EIP-7702 enables accounts to pay for transactions using gas sponsorship or have third parties (such as dApps or paymasters) cover transaction fees. This facilitates various use cases:
- Paying for gas in ERC-20 tokens instead of native tokens
- Application operators covering transaction costs for users, eliminating the need to hold native tokens for transaction fees
Privilege De-escalation
Users can create sub-keys or set specific permissions that are more limited than the global access of the main account. This feature improves security and control over account operations. Examples include:
- Granting permission to spend ERC-20 tokens while restricting access to ETH.
- Allowing a sub-key to spend only up to a certain amount per day.
- Limiting interactions to specific applications, thereby reducing the risk of unauthorized access.
Forward-compatibility with Account Abstraction
This EIP is designed to be highly forward-compatible with endgame account abstraction, without over-enshrining any fine-grained details of ERC-4337 or RIP-7560.
Specifically:
- The address that users sign can directly point to existing ERC-4337 wallet code.
- The "code pathways" used are often the same as those in a fully smart contract wallet environment, making them compatible.
- This approach helps avoid the issue of creating two separate code ecosystems, as they largely remain unified. While some workflows may still need workarounds, these are relatively few compared to the overall functionality.
- It does not require adding any new opcodes that would become unnecessary in a future without Externally Owned Accounts (EOAs).
- It allows EOAs to function like smart contracts, enabling them to be included in ERC-4337 bundles while remaining compatible with the existing EntryPoint.
Limitations
While EIP-7702 brings significant improvements to Ethereum EOA wallets, it's essential to understand the complete picture:
- Private Key Access Remains: The original key always maintains admin access to the upgraded account, limiting the security benefits an EOA wallet can offer
- Portability Limitations: Upgraded EOAs to Smart Accounts are tied to specific wallets, and transferring to a new wallet is a security-critical operation unless all wallets adopt the same smart contracts (which is unlikely)