Deciphering Ethereum Account Abstraction Scheme ERC-4337

AdvancedJun 27, 2023
ERC-4337 is poised to act as a catalyst for enhancing Web3 user experiences, ensuring security while reducing entry barriers, enabling transactions and contract creation within digital wallets, and opening the door to user-friendly, DIY design possibilities for crypto wallets.
Deciphering Ethereum Account Abstraction Scheme ERC-4337

Introduction

Since 2020, buzzwords such as DeFi, NFT, and Web3 have rapidly emerged, consistently introducing fresh concepts to the cryptocurrency landscape. However, for users unfamiliar with these cutting-edge technologies, there’s a significant learning curve involved in creating wallets, understanding smart contracts, and navigating decentralized applications.

In an effort to lower the barrier of entry for newcomers, Ethereum founder Vitalik Buterin, along with Yoav Weis and Dror Tirosh, introduced the account abstraction proposal, aiming to make Ethereum wallets more user-friendly.

ERC-4337 revolutionizes wallets by transforming them into “smart contracts,” which can also be considered “intelligent accounts.” This innovation provides advantages such as safeguarding against private key loss, streamlining transaction processes, and improving the user experience to help popularize cryptocurrencies.

First, let us explore Ethereum accounts.

Source: https://ethereum.org/zh/wallets/find-wallet/

Ethereum accounts serve as digital ledgers for storing and managing Ether (ETH) or other related digital assets, enabling transactions to be carried out on the Ethereum platform. Controlled by users, these accounts can also function as smart contracts. Every Ethereum account features a distinct address and its associated private key.

Currently, Ethereum has two account types: Externally Owned Accounts (EOAs) and Contract Accounts.

Externally Owned Accounts (EOAs) consist of cryptographic keys, including public and private keys. They enable the transfer and receipt of Ether and other tokens, such as those used by MetaMask — an Ethereum wallet effectively controlled by anyone possessing the corresponding private key.

Contract Accounts represent smart contract code deployed on the network. Unlike EOAs, they do not have private keys and depend on code-based logic for execution. Additionally, Contract Accounts cannot be accessed directly; the interaction is only possible through the execution of smart contracts.

In conclusion, Externally Owned Accounts (EOAs) act as traditional accounts, allowing direct control over funds and transaction submissions through private keys. In contrast, Contract Accounts are governed by smart contracts, which determine the management of funds and modes of interaction. Contract Accounts facilitate the execution of smart contracts, while Externally Owned Accounts (EOAs) primarily serve to authorize transactions.

How are Transactions Conducted on Ethereum?

Source: https://ethereum.org/zh/developers/docs/transactions/

Transactions entail the transfer of assets, such as tokens, from one external account to another, or issuing a command or directive to a smart contract. Within the Ethereum network, transaction execution is considered an instruction. For example, during a transaction, an Externally Owned Account (EOA) must provide a signature, while also covering the associated gas fees, exhibiting the following characteristics:

Decentralization: Ethereum is a decentralized platform that operates without the control of any centralized institutions or individuals. Transactions on Ethereum are verified and recorded by nodes within the network, ensuring that they are not influenced by governments or other organizations.

Smart Contracts: Ethereum transactions facilitate the deployment of smart contracts and invocating their functions. These automated agreements execute predetermined actions autonomously upon meeting specific conditions, eliminating the need for human intervention. This convenience paves the way for a plethora of use cases, such as voting and insurance claims processing.

Immutability: All Ethereum transactions are documented on the blockchain, becoming unalterable and indelible once confirmed. This guarantees the inviolability and transparency of transaction records.

Gas Fee Mechanism: The execution of Ethereum transactions requires computational resources, necessitating the payment of gas fees. The amount of gas fees is determined by factors such as transaction complexity and execution time. This mechanism serves to prevent malicious attacks and network abuse.

Swift Confirmation: Compared to other cryptocurrencies such as Bitcoin, Ethereum transactions are typically confirmed within seconds, making it a fast and efficient mode of transaction.

In summary, Ethereum transactions offer a swift, decentralized, immutable, and intelligent mode of transaction, catering to a diverse range of use cases.

Exploring EIP-4337 and ERC-4337: Introduction of the Ethernet Account Abstraction Scheme

In the Ethereum ecosystem, every technical advancement starts as an Ethereum Improvement Proposal (EIP) and, upon approval by the on-chain governance model and authorization of changes, it transforms into an Ethereum Request for Comment (ERC).

EIP-4337, first proposed in 2021, evolved into ERC-4337, which was officially implemented on the Ethereum network in March 2023. This development significantly improved transaction and contract creation processes within wallets.ERCs are a crucial aspect of the EIP landscape, primarily focusing on protocol and development standards.

Definition and Technical Details of ERC-4337

Definition

ERC-4337 is an Ethereum standard designed to transform user accounts into advanced smart accounts through a process called account abstraction. The primary goal of this standard is to facilitate tokenizable rights, offering a standardized method for defining and trading these rights within the Ethereum ecosystem.

Technical Details of ERC-4337

  • Interfaces and Methods: The ERC-4337 standard outlines a collection of interfaces and methods that allow for the creation, transfer, destruction, and querying of tokens on the Ethereum network.
  • Smart Contracts: To implement token functionality, ERC-4337 utilizes smart contracts, which contain all the necessary logic and rules governing the tokens.
  • Voting and Governance: ERC-4337 enables token holders to participate in voting and governance mechanisms by defining the appropriate contracts and interfaces for these processes.
  • Compliance Requirements: The ERC-4337 standard considers various legal and compliance requirements, such as Know Your Customer (KYC) and Anti-Money Laundering (AML). These requirements can be defined and implemented within the token contracts, ensuring regulatory compliance.
  • Upgradability: ERC-4337 provides support for token contract upgrades, which can be achieved through the use of upgrade contracts containing new features and rules. This feature ensures that the token contracts can evolve and adapt to changing requirements and regulations over time.

Introduction to Account Abstraction

Ethereum is set to revolutionize user accounts by introducing the Account Abstraction Scheme ERC-4337, also known as EIP-4337. This innovative approach combines the flexibility of Ethereum’s smart contract functionalities with user wallets, creating a seamless interaction between wallets and smart contracts. As a result, users can manage multiple signatures, authentication processes, initiations, and subscriptions more efficiently through code implementation.

Key Components of Account Abstraction

Account abstraction, primarily user-defined (by the wallet creator), consists of three main components: verification, revocation protection, and payments.

Verification

  • Support for various processing schemes (ECDSA, BLS, Quantum-resistant)
  • Adjustable signature functionality
  • Multisignature capabilities
  • Account recovery features

Revocation Protection

  • Sequential revocation protection
  • Multidimensional and concurrent revocation protection

Payments

  • Direct account payments
  • Appointment and compensation of administrators for asset management

A Technical Perspective from Vitalik Buterin

To further explain the concept of account abstraction, Vitalik Buterin’s Medium article provides a detailed illustration of user operations within the transaction pool. Notably, bundlers are responsible for paying the bundled transaction fees in ETH and are reimbursed through the fees associated with each UserOperation execution. Bundlers process these inclusions based on priority logic, similar to miners operating within the transaction pool.

Source: https://medium.com/infinitism/erc-4337-account-abstraction-without-ethereum-protocol-changes-d75c9d94dc4a

This shows that the bundler is required to pay for both the willing validator, so when UserOperation objects are processed, validated and executed by the Entry point or singleton contract, they are compensated in some way.

Inferior User Experience of EOA and the Concept Behind Account Abstraction

Source: https://twitter.com/iam_preethi/status/1454455482874306561

Now that we have a fundamental understanding of ERC-4337, let’s explore the reasons for its implementation on the Ethereum mainnet. Currently, most wallets, such as MetaMask and imToken, are either Externally Owned Accounts (EOAs) or supported by third parties. While these wallets enjoy widespread popularity, they encounter various challenges:

  • Security risks: If private keys are compromised, attackers can gain control of all assets within the account.
  • Limited signature algorithms: Only ECDSA signatures and verification algorithms are available for native protocol transaction validation.
  • Irreversible transactions: Transactions cannot be reversed, regardless of whether mistakes are made intentionally or accidentally.
  • Traceability issues: Ethereum transactions are public and permanent, which means all transactions on Ethereum external accounts can be traced, potentially compromising user privacy.

Additionally, standalone Contract Accounts (CAs) have their own set of problems:

  • Increased costs: Operations on contract wallets require initiation by EOAs through contract invocation, leading to higher gas fees for each transaction.
  • Interaction challenges: User experience may suffer due to complex operations, such as manually inputting transaction data and navigating cumbersome transaction procedures.
  • Decentralization trade-offs: Managing multiple accounts may necessitate reliance on a relayer to pay gas fees, undermining decentralization.
  • Compatibility concerns: Ethereum contract wallets may not be compatible with various networks or protocols, such as not supporting specific ERC standard tokens or lacking functionality for interacting with other blockchains.
  • Lack of standardization: The design and implementation of Ethereum contract wallets are not standardized, resulting in poor interoperability between different contract wallets. This can create difficulties for users when transferring assets between multiple contract wallets.

Comparing External Owned Accounts and Contract Accounts

In conclusion, users can create custom smart contracts within Contract Accounts by leveraging their code capabilities. The aim of account abstraction is to unify the features of both account types into a single protocol. A consolidated wallet can interact with tokens and create contracts simultaneously. The breakthrough of ERC-4337 lies in decoupling ownership and signatures within abstract accounts, effectively addressing issues in a balanced manner.

The ERC - 4337 Compromise Solution

Safe Multi-signature Wallet Scheme

Source: https://safe.global/

The so-called multi-signature wallet refers to a contract wallet that uses smart contracts to implement multi-signature transaction features. Taking the Safe multi-signature wallet as an example (formerly known as Gnosis Safe), we can set a multi-signature rule managed jointly by three or more individuals, such as tripartite or five-party management, requiring the joint signature confirmation of two or three people before a transaction can be executed (2-of-3, 3-of-5).

Below is the solution of the Safe multichain wallet:

Multichain Support: Safe supports various cryptocurrencies and blockchain networks, such as Ethereum, Bitcoin, Tron, and more. Safe users can manage different digital assets in the same wallet without using different wallets for different cryptocurrencies.

Security: Safe employs advanced encryption technologies to safeguard users’ private keys and asset security. Private keys are stored locally on the user’s device and are not stored on Safe’s server or anywhere else. Additionally, Safe provides backup and restoration features so assets can be quickly recovered if a user’s device is lost or damaged.

Usability: Safe offers a user-friendly interface that allows users to send and receive different cryptocurrencies easily. In addition, Safe provides real-time price updates, multilingual support, and social media sharing features to enhance user experience.

Compatibility: Safe can integrate with multiple blockchain networks and third-party applications. For example, Safe can integrate with decentralized exchanges, allowing users to conduct transactions directly within the Safe wallet.

Community Support: Safe boasts an active community where users can communicate and share experiences with other users. Moreover, the Safe Community provides technical support and a security vulnerability reporting mechanism to ensure the safety and stability of the Safe Wallet.

While this approach brings convenience to users, due to the complexity of its wallet contract and backend program functions, it is not user-friendly for non-technical individuals. Hence, the Safe solution struggles to become a universally accepted industry standard and is better suited for those needing some customized, special functionality services.

Therefore, the pros and cons are particularly highlighted through analysis. The advantage lies in the highly customizable capabilities of the smart contract itself, enabling the implementation of flexible, dynamic, and strong self-organizing features. The downside, however, remains in its reliance on EOA accounts for management, which fundamentally indicates the limitations of the signature algorithm.

What does ERC-4337 Mean for Users and the Industry?

Source: https://inevitableeth.com/en/home/ethereum/upgrades/consensus-updates/account-abstraction

The integration of ERC-4337 with Ethereum carries profound significance for web3 users, ecosystems of EVM-compatible chains, and the entire crypto space. It features key enhancements by adding new functions and upgrading existing ones, making token usage more convenient and flexible. Consider the following:

For users

More convenient token transfer: ERC-4337 introduces new features, such as an annotation function during token transfer, enabling users to add comments more conveniently, and facilitating subsequent tracking and management.

More secure token transactions: ERC-4337 applies new security protocols and mechanisms, enhancing identity verification in token transactions, and making transactions more secure and reliable.

More flexible token usage: ERC-4337 introduces new functions, such as token burning and recycling, making token usage more flexible.

For the industry

Wider application scenarios: The improvements of ERC-4337 allow tokens to be used in a broader range of fields and scenarios, such as the Internet of Things, supply chain management, and digital assets.

Higher security and reliability: Security upgrades and the addition of identity verification mechanisms enhance the security and reliability of token transactions, which will positively impact industries like finance and insurance.

Improved interoperability: The upgrades in the ERC-4337 standard facilitate easier transfers and exchanges between different tokens, promoting the development of the token market and the growth of the token economy.

Conclusion

Given its potential, ERC-4337 might trigger a fervor among cryptocurrency investors. The introduction of account abstraction elements into wallets using smart contract technology indicates vast possibilities and suggests more individuals joining the fray.

On another level, Ethereum’s ERC-4337 will encourage broader cryptocurrency adoption. It transforms a complex digital unbanked payment system into a simplified system that most people can comprehend and accept. Consequently, for the next generation of crypto-adopters, this could be an extraordinarily grand vision.

Author: AC-core
Translator: piper
Reviewer(s): Hugo、Edward、Ashley He
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Start Now
Sign up and get a
$100
Voucher!
Create Account