EIP-3074 and EIP-7702: A New Era to Account Abstraction
Exploring Ethereum's Pectra upgrade and its significant enhancements in account abstraction through EIP-3074 and EIP-7702.
About BuildBear
BuildBear is tailored for DApp development and testing, offering rapid transaction times, unlimited token minting, and comprehensive debugging tools.
The Ethereum Account Abstraction roadmap kicked off in 2023 and has since become a prominent subject, especially with the recent announcement of EIP-3074's inclusion in the upcoming Ethereum Hard fork (Pectra).
This article explores how the Pectra upgrade aims to improve Ethereum wallet functionality and enhance the user experience, focusing on its major contributing EIPs: EIP-3074 and EIP-7702.
What is the Pectra Upgrade?
The Ethereum Pectra upgrade, expected to be implemented in early 2025, is the next major improvement to the Ethereum Network. The main goals include increasing the maximum stake for validators, improving Ethereum Virtual Machine (EVM) efficiency, and potentially introducing user experience enhancements for wallets.
As a web3 enthusiast, you may have heard a lot about Account Abstraction. Let’s explore how this concept is set to improve wallet functionality.
Understanding Account Abstraction
Account abstraction means smart contracts that can do more than traditional Externally Owned Accounts (EOAs). EOAs are controlled by private keys and can initiate transactions by signing them.
Smart Contract Accounts (SCAs) evolved to handle complex transactions beyond basic wallets, executing actions based on predefined logic.
Here's a quick comparison:
Feature | EOA | SCA |
---|---|---|
Control Mechanism | Controlled by private keys | Governed by smart contract code |
Transaction Initiation | Signing with private key | Executes actions in response to messages or calls |
Flexibility | Limited to basic transactions | Programmable flexibility enabling dynamic behaviors |
Security | Relies on private key management | Requires careful design and testing |
Meta Transactions | Not natively supported | Supports meta-transactions |
Functionality | Direct control, limited | Batching actions into a single transaction |
Use Cases | Individual ownership, basic transactions | Complex decentralized apps, automated processes |
Benefits:
- Simplifies interaction
- Allows smart contracts to control EOAs
- Minimizes key management risks
Account abstraction in numbers. Source: Dune Analytics
Future of Account Abstraction: ERC-4337 and Beyond
ERC-4337 enhances user experience with token-based gas fees, complex recovery mechanisms, and advanced batching functionalities. Still, most SCAs rely on EOAs due to conversion challenges.
EIP-3074 and EIP-5003 address these issues, allowing EOAs to delegate control permanently.
What is EIP-3074?
EIP-3074 introduces new Ethereum opcodes empowering smart contracts to interact securely with EOAs:
- AUTH: Authorizes smart contracts.
- AUTHCALL: Executes authorized actions.
Image from Jarrod Watts
Example: Swap 10 DAI for ETH using a single authorization (AUTH) with immediate transaction execution (AUTHCALL).
Benefits of EIP-3074
- EOA Control Delegation: Enhanced security by delegating execution to smart contracts.
- Sponsored Transactions: Third-party gas sponsorship simplifies transactions.
- User Experience: Efficient interaction with dApps.
- Batch Transactions: Group multiple actions into one.
Challenges
- Malicious invoker risks
- Temporary delegation limitations
- Ether spending restrictions
- Self-sponsoring impacts
Emergence of EIP-7702
Vitalik proposed EIP-7702, temporarily converting EOAs into smart contracts per transaction:
- contract_code: Temporary smart contract logic
- signature: ECDSA authorization
Example: Perform token swap and staking simultaneously.
Benefits of EIP-7702
- Trustless Execution: No invoker needed.
- Simplified Complex Transactions: Single-step execution.
- Future-Proof Compatibility: Aligned with ERC-4337 and future developments.
EIP Comparison
EIP-3074 | EIP-7702 |
---|---|
New opcodes: AUTH, AUTHCALL | New transaction type: user_operation |
Not future-compatible | Compatible with future AA implementations |
Delegates EOA control | Temporarily embeds smart contract code |
Reduces key exposure, needs invoker | Completely trustless |
Conclusion
Account Abstraction, through EIP-3074 and EIP-7702, significantly improves user experience, making blockchain interactions simpler and more secure.