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.

Written by BuildBear Team on Jul 26, 2024

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.

Account abstraction

Here's a quick comparison:

FeatureEOASCA
Control MechanismControlled by private keysGoverned by smart contract code
Transaction InitiationSigning with private keyExecutes actions in response to messages or calls
FlexibilityLimited to basic transactionsProgrammable flexibility enabling dynamic behaviors
SecurityRelies on private key managementRequires careful design and testing
Meta TransactionsNot natively supportedSupports meta-transactions
FunctionalityDirect control, limitedBatching actions into a single transaction
Use CasesIndividual ownership, basic transactionsComplex decentralized apps, automated processes

Benefits:

  • Simplifies interaction
  • Allows smart contracts to control EOAs
  • Minimizes key management risks

Account abstraction stats

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.

EIP-3074 mechanism

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-3074EIP-7702
New opcodes: AUTH, AUTHCALLNew transaction type: user_operation
Not future-compatibleCompatible with future AA implementations
Delegates EOA controlTemporarily embeds smart contract code
Reduces key exposure, needs invokerCompletely trustless

Conclusion

Account Abstraction, through EIP-3074 and EIP-7702, significantly improves user experience, making blockchain interactions simpler and more secure.

Connect with us: Twitter | LinkedIn | Telegram | GitHub