Account Abstraction With Ethereum’s ERC-4337 Standard

In this article, we take a closer look at account abstraction on Ethereum and how the concept can help improve wallet security, add new exciting features related to gas, as well as the risks associated with it.

Enter.art logo
@enter.artPUBLISHED 21ST APRIL 2023

Since its first iteration, the internet has evolved from being read-only— where only website admins and ‘webmasters’ could interact with the system— to the present day, where readers can not only read but also create and contribute. Account abstraction provides a similar experience for crypto users, a new paradigm that allows users to participate more and get more engaged in the crypto space.  

Account Abstraction (AA) is a recent development in the blockchain and crypto ecosystem which has generated a lot of interest. Last month, the Ethereum team introduced a new standard, ERC-4337, which enables the implementation of account abstraction, a concept that had been discussed for nearly ten years. While the concept of Account Abstraction may appear complex, ambiguous, and unclear to some, this article aims to provide a simplified explanation of the technology and its potential impact on the way people interact within the ecosystem.

With this novel feature, crypto users can perform a broader range of actions, including gasless transactions, adding two-factor authentication to their wallets, scheduling blockchain transactions, and having a recovery option for their private keys. This means that as a result of account abstraction, crypto users do not have to worry about losing their 12-word recovery phrase.

Source: IQ.Wik

Source: IQ.Wik

Understanding The Basics: Ethereum Account

To understand Account Abstraction, also known as the ERC-4337 standard, it is important to first review the operating principles of the Ethereum chain. This will provide an understanding of key terms, the rationale for introducing the new standard, how it will function, and other relevant details about  the topic.

There are two main types of accounts on Ethereum: externally owned accounts (EOA) and contract accounts. EOAs are self-managed and are the most commonly used Ethereum wallets, including popular options such as MetaMask, Exodus, and Ledger Nano. EOA holders control their accounts via private and public key pairs, which are used to interact with the blockchain.

In contrast, contract accounts, commonly called smart contracts, are not managed by users but are governed by the logic of code. A key feature of contract accounts is that they cannot be modified or updated once deployed. Unlike EOAs, users do not have direct control over smart contracts, as they function as programs on the Ethereum Virtual Machine (EVM).

Problems With Externally Owned Accounts (EOAs)

EOAs, or Externally Owned Accounts, represent a novel concept in the Ethereum ecosystem that has simplified user interaction with the blockchain. However, several inherent limitations with EOA accounts hinder their widespread adoption.

For any transaction to be executed on an EOA, it must be digitally signed by the account user. This requires using private and public keys, where the private key is used to sign off on a crypto transaction, indicating user approval. The transaction cannot be completed on the blockchain without the private key.

EOA wallets, such as MetaMask, are designed such that users' private keys are encoded as secrets or recovery phrases and assigned to them. It is imperative that users securely store these phrases, as they guarantee ownership of their crypto assets. Losing access to these recovery phrases encoding the private keys is a major issue, as it is impossible to prove crypto ownership, resulting in the loss of access to the assets stored in the wallet.

The crisis of losing access to private keys has been reported multiple times and has become increasingly common. In 2021, Chain Analysis reported that over $140 billion, accounting for 20% of Bitcoins in circulation, has been lost due to users not having access to their wallets.

Another major limitation of EOA wallets is their vulnerability to malicious attacks by bad actors who can easily rob users of their funds and data. This flaw is based on the design of EOAs, where despite possessing their private keys, users are still vulnerable to hacking incidents. 

EOA wallets also suffer from a lack of flexibility, as users are unable to perform simple actions such as enforcing two-factor authentication on their wallets for added security. Authorizing automated transactions is only possible in some cases, where users are required to open a new EOA wallet referred to as a “burner” account to store the necessary amount of crypto, segregated from their main account, which will then participate in the decentralized application in question. Automating this process would save users the stress of storing another recovery phrase, but they would remain vulnerable to hacks.

EOAs badly needed a better user experience that supports additional actions such as carrying out batch transactions, permission control, and setting transaction limits. The limitations associated with EOA wallets constrained users’ cryptocurrency adoption, which was — and in many cases remains — a significant setback. To solve these major issues, Ethereum developers invested time and resources into account abstraction.

What Does Account Abstraction Mean?

The concept of Account Abstraction involves the creation of wallets that can be customized and programmed to meet specific user requirements. An ideal visualization is that users can carry out all their transactions using smart contract wallets rather than relying solely on externally owned accounts (EOAs). The idea involves merging externally owned accounts with contract accounts, resulting in a more flexible and versatile wallet system. 

Brief History: How ERC-4337 Happened 

The ERC-4337 standard was not created overnight. Rather, it was the result of numerous iterations and proposals put forward by the Ethereum Foundation.

One of the earliest proposals was EIP-86, which was submitted in 2016. This proposal suggested allowing multiple parties to manage a single account instead of relying on codes. However, this proposal did not gain acceptance.

In 2020, the Foundation submitted EIP-2938, which introduced the concept of an "AA transaction" that enabled transactions to be initiated from a smart contract instead of an EOA. Another proposal, EIP-3074, was also presented in the same year, which aimed to give smart contracts control over EOAs. Under this proposal, an EOA would function like a smart contract without the need to deploy any contract.

Despite these proposals, none of them were accepted due to the significant changes they would bring to the Ethereum network. These changes would have led to a difference in the network's consensus layer, causing a fork in the network.

However, the proposal that eventually gained acceptance was EIP-4337, introduced in 2021. This standard was seen as the ideal solution as it planned to implement account abstraction without any network changes. It was a game changer for the Ethereum network, allowing for greater flexibility and customization while retaining the network's existing structure.  

Yoav Weiss announcing the release of ERC-4337 standards. (Credit: Twitter.com/@erc4337)

Yoav Weiss announcing the release of ERC-4337 standards. (Credit: Twitter.com/@erc4337)

On March 2, 2023, the announcement for Account Abstraction was made. “The rumors are true… ERC-4337 has been deployed on mainnet 🚀.” Weiss noted the remarkable feat stood after ERC-4337 passed an audit by Open Zeppelin. 

How ERC-4337 Works 

The concept of account abstraction has been a topic of discussion for quite some time, but it has received little attention due to the proposed model in the past. If AA had been introduced in the previous proposal, it would have caused a significant change in Ethereum's core, resulting in a fork. A fork in the crypto world happens when there is a modification in the underlying rules for the blockchain network or protocol, leading to a split in the chain because the community decides to take different paths. For instance, the Ethereum network hard fork resulted in Ethereum and Ethereum classic.

However, in 2022, the Ethereum team proposed EIP-4337, which relies on a high-level system known as the mempool, making account abstraction feasible. The community embraced EIP-4337 because it would be deployed as a smart contract, indicating that the Ethereum network would remain the same. The ERC-4337 shifts all transactions off the Ethereum blockchain and onto Ethereum Virtual Machine (EVM)-compatible networks, such as Polygon, Arbitrum, Avalanche, among others. This significant upgrade improves the flexibility and ability to customize the network.

Although the concept of account abstraction is relatively new on the Ethereum blockchain, some layer-two chains have implemented similar approaches. Starknet and zkSync fall under this category, providing a similar, non-holistic package as seen with the ERC-4337 standard.

Advantages Of Account Abstraction 

There are several benefits attached to using an abstracted wallet rather than the EOAs. These benefits sprout from the customizability of the wallet. Some of the benefits of AA are listed below:

Account Recovery: With the introduction of account abstraction, the chances of a user losing access to their account due to a lost seed phrase decreases significantly. This is because account abstraction allows the use of the social recovery method, which enables users to assign trusted individuals or commercial services as recovery agents for their accounts. In other words, users can assign someone they trust or a reputable third-party service to help them regain access to their account in case they lose their seed phrase.

This development has given users peace of mind, as they no longer have to worry about cramming or losing their seed phrase. They can now entrust the recovery of their account to designated agents, thus making account recovery much more manageable and secure. 

Sponsored Transaction: This has become a significant development for dApp developers. This feature offers a unique opportunity for dApps to enhance their product adoption rates by implementing strategies such as waiving transaction fees for new users. By doing so, onboarding new users onto their platform becomes seamless, eliminating the need for users to purchase Ethereum on a centralized exchange before transferring to the dApp. Implementing Sponsored Transactions provides an overall frictionless experience for new users, potentially leading to a surge in platform usage and adoption.

Risk-Free Gaming Session: this feature aims to revolutionize web gaming. Now, web3 gamers can link their wallet directly to the game, limit the number of transactions, and set limits for the total amount deductible from such wallets. Each transaction doesn’t need to be signed, unlike before the introduction of ERC-4337. This adds flexibility and an extra layer of security. 

Multisig wallet: the wallets require the signature of two or more parties (predetermined addresses) before a transaction can be completed. On EOA wallets, transactions are initiated first before the multisig smart contract is requested to complete. This process could be more efficient and effective. With account abstraction, the wallet can exist as a multisig account without requesting an external multisig smart contract. 

Batch Transaction: unlike with the EOAs, where every transaction can’t co-occur, a smart contract wallet allows users to batch or bundle-send a token or coin in the same transaction. 

Gasless Transaction: account abstraction brings gasless transactions to life. These types of transactions are referred to as Meta-transactions. Meta transactions allow the receiver to pay the gas fees instead of the sender.

Transaction Limits: the new Ethereum standard allows wallets to be configured such that users can set a transaction limit in their account. This feature is not available with EOAs.

There are a lot of opportunities attached to the new Ethereum standard; this flexibility changes the entire landscape of user interaction and, ultimately, adoption. In the words of Yoav Weiss, an Ethereum Foundation security researcher,  “It gives you the same features a bank would without having to trust a bank,” adding that “the next billion users are not going to write 12 words on a piece of paper. Normal people don’t do that… We need to give them better usability. They shouldn’t need to think about cryptographic keys.”

Disadvantages of Account Abstraction

The idea behind account abstraction is novel; however, like most ideas, it has shortcomings. But these setbacks don’t outweigh the benefits. Some of the grey areas with account abstraction are: 

Vulnerability: this is the most important problem with account abstraction. Smart contract users’ funds might get breached with hackers siphoning the funds off, and this vulnerability has been exploited in recent times. 

Lack of understanding: Since account abstraction is still in the early stages, there is a need for more educational resources that will help guide users on how to set up an account or even properly carry out transactions with abstracted wallets.  

Data and Privacy Breach: users’ data can be breached if security measures to prevent such an event properly aren’t put in motion by developers.

Conclusion 

Ethereum is widely recognized as one of the most influential blockchain networks, paving the way for a new era of financial innovation. The Ethereum team has been committed to advancing the network's capabilities, interoperability, and adoption. This latest upgrade has the potential to onboard more individuals into the crypto industry, removing existing barriers and introducing a groundbreaking concept that enhances the Ethereum network's usability, particularly in facilitating activities previously possible only through traditional financial applications. However, additional educational efforts are necessary to ensure users are familiar with the new technology and are equipped to leverage it effectively.



This article is written by Chidera Anushiem as a part of enter.blog's bounty program and is a part of a two-part series. Do you have an interesting topic, series or subject you think would be fitting for enter.blog? 

You can now submit your articles to enter.blog and get paid for your contributions!
Read more and submit your article here

Crypto & Learning

Hungry for knowledge? Here you can get acquainted with blockchain, wallet security, DeFi and much more.

View all

PUBLISHED 17TH NOVEMBER 2022

Bankman’s Darling Couldn’t Survive the Bankrun, But What Are the Talking Points From FTX’s Collapse?

In this article, we take a closer look at the sudden, spectacular collapse of FTX and Alameda and analyze the key takeaways from the ongoing debacle.

PUBLISHED 27TH MARCH 2023

Due Diligence and Red Flags in Web3

As the world of Web3 is constantly evolving, and new projects are popping up every day, there are a few key things you should keep an eye out for; red flags, if you will. In this article, we uncover some of the basics to be aware of when investing in Web3 projects.

PUBLISHED 13TH MAY 2022

What Are Layer One Blockchains?

Layer one blockchains are like the foundation of a building. They are the base on which layer two blockchains are built. In this guest article, we’re getting to the core of what layer one blockchains are, and how scaling them is essential for NFTs.

{{loaderText}}