Account Abstraction for Dummies

Jhony
Conflux Network
Published in
8 min readMar 31, 2023
Author: Jhony

As the Ethereum network continues to evolve, addressing the diverse and ever-growing needs of the decentralised finance (DeFi) and decentralised application (dApp) ecosystems is crucial.

Ethereum, a leading decentralised platform, enables developers to create decentralized applications (dApps) and execute smart contracts. Account abstraction is a proposed concept that revolutionises the way accounts and transactions function in the Ethereum network, making it more flexible, extensible, and adaptable.

Account Abstraction aims to combine features of the protocol’s two existing account types: Externally owned accounts (EOA) and Contract Accounts (CA). In this article, we will explore the reasons why account abstraction is necessary for Ethereum’s future success.

Accounts in Blockchain 101

Externally Owned Accounts (EOAs) and Contract Accounts (CAs) form the backbone of the Ethereum network, enabling users to interact with the platform and execute smart contracts. While EOAs are controlled by private keys and can initiate transactions, CAs are governed by their associated smart contract code and execute functions based on predefined rules and logic.

Understanding the differences between EOAs and Contract Accounts is crucial for grasping the fundamentals of Ethereum’s decentralised ecosystem and unlocking its potential for a wide array of use cases, including decentralised finance (DeFi) and various decentralised applications (dApps).

Source: GnosisDAO

Externally Owned Accounts (EOA)

Externally Owned Accounts, or EOAs, are the most basic and prevalent account type on the Ethereum network. An EOA is controlled by a user’s private key and serves as a fundamental building block for user interactions within the Ethereum ecosystem. Their main characteristics and functions are:

  1. Private Key Control: EOAs are controlled by a private key, which is a randomly generated cryptographic key that ensures the security and ownership of the account. The private key enables users to sign transactions and messages, ensuring the authenticity and integrity of the actions performed by the account.
  2. Initiating Transactions: EOAs can initiate transactions, sending Ether (ETH) or interacting with smart contracts on the Ethereum network. When an EOA initiates a transaction, it includes a nonce, gas price, and gas limit to determine the transaction’s priority, cost, and maximum computational power.
  3. Holding Ether and Tokens: EOAs can hold Ether, the native cryptocurrency of the Ethereum network, as well as tokens created on the platform. Users can send, receive, and manage their digital assets using EOAs.
Source: Ethereum Docs

Contract Accounts (CA)

Contract Accounts, in contrast to EOAs, are not directly controlled by a private key. Instead, they are governed by their associated smart contract code, which defines the rules and logic for the account’s behaviour. Their main characteristics and functions are:

  1. Smart Contract Control: Contract Accounts are automatically generated when a smart contract is deployed on the Ethereum network. The smart contract code determines the rules and logic that govern the Contract Account, and its behaviour can only be altered by invoking the functions defined within the smart contract.
  2. Executing Contract Functions: Unlike EOAs, Contract Accounts cannot initiate transactions by themselves. Instead, they are designed to execute specific functions when triggered by transactions or messages from EOAs or other Contract Accounts. These functions can include updating internal states, transferring Ether or tokens, or interacting with other smart contracts on the network.
  3. Immutable Code: Once a smart contract is deployed and its corresponding Contract Account created, the code cannot be altered. This immutability ensures the trustworthiness and security of Contract Accounts, as users can be confident that the smart contract’s behaviour will not change unexpectedly.

For more information on Ethereum accounts, please visit Ethereum Docs.

Source: MakerDAO

Why is Account Abstraction Necessary

The current Ethereum protocol imposes certain limitations on transaction formats, which can hinder the development of new and innovative transaction types. Account abstraction allows users to define their own transaction formats and validation rules, fostering greater innovation within the ecosystem.

By enabling more advanced transaction types, account abstraction paves the way for transactions with built-in privacy features, alternative fee markets, and customizable access control mechanisms. This versatility empowers developers to design novel solutions that cater to a wide array of use cases, ultimately benefiting the broader Ethereum community.

Simplifying Layer-2 Solutions

One of Ethereum’s most significant challenges is its ability to scale and handle a higher transaction throughput. Layer-2 scaling solutions, such as Optimistic Rollups and ZK-Rollups, are being developed to address this issue.

Account abstraction can simplify the development and deployment of layer-2 solutions by offloading some of the processing to the Ethereum network. This offloading can lead to greater efficiency, reduced complexity, and lower costs for layer-2 applications, ultimately making them more accessible to a broader range of users.

Enhancing User Experience

The current Ethereum protocol requires users to pay gas fees in Ether (ETH), which can be inconvenient and potentially exclusionary for users with diverse token holdings. Account abstraction enables alternative gas payment methods, allowing users to pay transaction fees in other tokens or through more complex payment schemes.

This flexibility not only improves the overall user experience but also allows for greater inclusivity within the Ethereum ecosystem, as users can participate without having to hold or acquire ETH specifically for gas fees.

In short, account abstraction can lead to a more modular and adaptable Ethereum protocol, better equipped to accommodate the rapidly evolving DeFi and dApp ecosystems. For a deeper understanding, please refer to this Cryptopolitan article.

Laying the Groundwork: EIP-2938

EIP-2938 was an earlier Ethereum Improvement Proposal to introduce account abstraction to the Ethereum network.

While the concept aimed to make Ethereum more flexible and extensible by allowing users to define custom transaction formats and validation rules, the proposal has been marked as inactive for several reasons:

  1. Technical challenges: Implementing EIP-2938 required addressing numerous technical challenges, such as ensuring the security and stability of the Ethereum network while making significant changes to the underlying protocol.
  2. Consensus issues: Achieving consensus within the Ethereum community for any major protocol change can be a lengthy and complicated process.
  3. Alternative proposals: As the Ethereum ecosystem is continuously evolving, newer proposals that address the same goals as EIP-2938, but with different approaches or improved solutions, emerged. For instance, EIP-4337, was a more concrete proposal that brought Ethereum closer to account abstraction by introducing a new transaction type called “user operation.”

Although EIP-2938 is currently inactive, the ideas and concepts it presented have likely influenced subsequent proposals and development efforts within the Ethereum community. Newer proposals, such as EIP-4337, are built upon the groundwork laid by EIP-2938 to bring account abstraction to Ethereum in a more feasible and secure manner.

To learn more, please refer to this Binance article.

EIP-4337

EIP-4337 is an Ethereum Improvement Proposal that was officially deployed on March 1st, 2023, and plays a crucial role in advancing account abstraction within the Ethereum network. This proposal introduced a new transaction type called “user operation,” which allows users to define their transaction formats and gas payment methods.

By sending their user operations to a relayer, which aggregates and submits them as a standard transaction to the Ethereum network, EIP-4337 enables greater flexibility and brings Ethereum closer to achieving full account abstraction.

Source: Bit2Me

The core features of this proposal composes of:

  1. Decoupling transaction formats from the core protocol

EIP-4337 allows for more flexible and extensible transaction types by separating transaction formats from the Ethereum protocol. This separation enables developers to create innovative transaction types tailored to their specific use cases, ensuring the protocol remains adaptable to the diverse needs of the DeFi and dApp ecosystems.

2. Alternative gas payment methods

With EIP-4337, users can pay gas fees in alternative tokens or employ more complex payment schemes. This increased flexibility improves Ethereum’s usability for various applications and permits greater inclusivity for users with diverse token holdings.

3. Simplifying layer-2 solutions

EIP-4337 reduces the complexity of layer-2 solutions by offloading some processing tasks to the Ethereum network. This offloading can lead to greater efficiency and lower costs for layer-2 applications, thereby making them more accessible to a broader range of users.

For more information, please refer to the official Ethereum Improvement Proposals website.

Challenges and Solutions

While account abstraction and EIP-4337 promise numerous benefits, they also introduce new challenges that need to be addressed before these advancements can be fully realised:

Security Concerns

The introduction of custom transaction formats and validation rules may increase the attack surface of the Ethereum network. As a result, new security measures must be devised to ensure the network remains resilient to potential threats.

Solution: Research and collaboration within the Ethereum community to identify and mitigate security risks.

Infrastructure Adjustments

The implementation of account abstraction and EIP-4337 may require significant adjustments to the existing infrastructure that interacts with the Ethereum network.

Solution: Cooperation among developers, wallet providers and node operators to minimise disruption and ensure a smooth transition to the new account abstraction framework.

Complexity and Developer Adoption

As the Ethereum protocol becomes more modular and flexible, it may also become more complex for developers to navigate and understand. This complexity could potentially hinder the adoption of account abstraction features.

Solution: Prioritise comprehensive documentation and developer tools to support developers to ensure that the full potential of account abstraction and EIP-4337 is realized.

For more information on the risks and challenges presented by account abstraction, please refer to this blog by dynamic.xyz.

Closing Thoughts

Account abstraction is a necessary advancement for the Ethereum network as it addresses several critical limitations of the current protocol. By fostering innovation, simplifying layer-2 solutions, enhancing user experience, account abstraction paves the way for a more versatile and efficient Ethereum ecosystem.

As the DeFi and dApp landscapes continue to grow and evolve, the implementation of account abstraction will be instrumental in ensuring Ethereum’s continued success and relevance in the world of blockchain technology.

--

--