What is account abstraction: A beginner's guide to Ethereum’s ERC-4337 standard

What is account abstraction: A beginner's guide to Ethereum’s ERC-4337 standard

Ethereum account abstraction is a new paradigm to allow for a more user-friendly experience when interacting with decentralized applications (DApps). Account abstraction within blockchain systems allows for assets to be exclusively held by smart contracts rather than being controlled by externally-owned accounts (EOAs). The ERC-4337 standard is the account abstraction token standard that unlocks the power of smart contract crypto wallets on the Ethereum blockchain.

From an Ethereum user’s perspective, the implementation of account abstraction signifies the concealment of technical details involved in Web3 interactions. This concealment not only refines wallet design but also elevates the overall user experience. Vitalik Buterin, co-founder of Ethereum, recognizes account abstraction as pivotal in propelling the widespread adoption of the Ethereum platform. 

This article is focused Ethereum account abstraction, exploring how account abstraction is redefining user-experience with smart contract wallets and understanding the ERC-4337 token standard in the Ethereum ecosystem, and delves into account abstraction benefits for improving chances for a Web3 revolution to help onboard users and drive mass adoption.

History and evolution of account abstraction 

Ethereum, when initially conceived, adopted an account-based model for its blockchain. This model included two types of Ethereum accounts: externally owned accounts controlled by public and private keys and contract accounts controlled by the code of smart contracts. 

Users interact with Ethereum using EOAs. For anything to happen on the Ethereum blockchain, a transaction is to be initiated and paid for by the user with an EOA. 

However, this setup has some drawbacks.

EOAs, such as the noncutstodial MetaMask wallet, Coinbase and other popular wallet accounts, are made up of a cryptographic pair of keys: public and private. These keys provide access to the user account. Every time a transaction is made, or the user wishes to mint, gift or transfer a nonfungible token (NFT) or a crypto coin, the EOA signs the transaction and pays the associated gas fees. 

Gas fees were first introduced in the early days of Ethereum as a means to gauge the amount of computational work needed to execute transactions and smart contracts. To encourage miners to incorporate user’s transactions in blocks, users have to pay the gas fees.

This entire process with EOAs involves multiple steps and confirmations and is tedious to complete for an average new user setting up their first activities on a DApp. Furthermore, if users misplace their private keys, they may lose their funds held in EOA accounts. The result is a fractured and daunting Web3 experience. 

The following depicts a common step-by-step experience that a new user goes through in order to complete their first action on a DApp from a new EOA:

Tedious process of externally-owned accounts (EOAs)

The introduction of account abstraction by the Ethereum team and Buterin at WalletCon in Denver in March 2023 and later at EthCC in Paris in July 2023 is poised to bring a transformation in easing this Web3 user experience.  

ERC-4337 token standard

The introduction of ERC-4337 enables the possibilities for creating ERC-4337 wallets. 

Ethereum has strategically outlined its intention to enhance the accessibility of all facets within the cryptocurrency realm by leveraging the potential of account abstraction, facilitated by the implementation of ERC-4337 and Ethereum Improvement Proposal (EIP) 4337. 

ERC-4337 is a token standard co-authored by Buterin, Kristof Gazso, Dror Tirosh, Tjaden Hess, Yoav Weiss and Shahaf Nacson that introduces account abstraction without changes to the underlying Ethereum protocol. 

Many EIPs were proposed for Ethereum account abstraction before ERC-4337 was officially accepted. These include:

EIPs proposed for Ethereum account abstraction before the ERC-4337 standard

EIP-4337 was proposed in 2021 and was eventually authorized and accepted via governance in 2023 because it ensured zero consensus-layer protocol changes. ERC-4337 is aimed at allowing developers to write custom smart contract wallets much more easily. 

Related: Asset tokenization: A beginner’s guide to converting real assets into digital assets

How does ERC-4337 work?

ERC-4337 introduces a “pseudo-transaction” object called a UserOperation, which sends a transaction on behalf of the user. Unconfirmed UserOperation transactions are stored in an “alt mempool.” 

Nodes on the Ethereum network can choose to act as a “Bundler,” which picks up multiple such UserOperations and packs into a single transaction known as a bundle transaction. The bundle transactions are sent to a global smart contract known as the “EntryPoint” on the Ethereum blockchain. It is important to note that there is only one entry point on the Ethereum blockchain.

How does Ethereum account abstraction work

The Bundler initiates a function call on the EntryPoint smart contract named “handleOps.” Within this function, the bundle transaction is received, and subsequently, a distinctive function, validateUserOp, is invoked for each account. 

The purpose of validateUserOp is to authenticate the signature of the operation and, if the operation aligns with the account’s evaluation, process the corresponding gas fee payment. Each smart contract wallet must then implement another function and execute the operation that is sent in by the EntryPoint contract. Thus, as depicted below, the whole function becomes programmatic, removing private key dependencies and tedious processes for users.

A simplified flow of Ethereum account abstraction

Account abstraction wallets

Few of the account abstraction wallets that leverage the smart contract functionalities include Argent, Ambire, Safe, Braavos and others. Braavos operates on top of Starknet, an Ethereum layer-2 scaling solution that offers low fees and account abstraction built into the protocol. 

Argent is a popular social recovery abstraction wallet in the Ethereum ecosystem. Buterin called social recovery as a “preferred method for securing a wallet.” Social recovery allows one to have account recovery access through previously whitelisted addresses, such as those of trusted friends and family, or hardware wallets, such as Ledger and Trezor, or simply by making use of Argent’s own Argent Guard service.

Benefits of account abstraction

Account abstraction has a wide range of benefits for Web3 users. These include:

Elimination of seed phrase reliance

ERC-4337 also allows for secure wallets without seed phrases. This liberation from the reliance upon seed phrases reduces vulnerabilities associated with the loss or hack of seed phrases. ERC-4337 introduces other friendlier wallet protection and logins, such as two-factor authentication, biometrics etc., familiar with traditional banking practices. These are user-friendly and may boost adoption. 

Removing human error with smart contract wallets

With the incorporation of smart contract wallets, the potential for human error is notably diminished, thus amplifying overall operational accuracy. Account abstraction also improves a blockchain network’s security. It is difficult for attackers to steal money from a specific account because the user’s private key is not used to directly control the assets contained in the account — only to authorize the execution of a smart contract.

Seamless compatible chains

ERC-4337 allows the ease with which adaptations can be aggregated across diverse blockchains. It is available on networks compatible with the Ethereum Virtual Machine, such as Polygon, Avalanche, Arbitrum and several others. 

Shared accounts and multi-user operations

With EOA wallets like MetaMask, one would either give someone full access to their crypto wallet or choose not to provide it to anyone, thanks to a single seed phrase controlling full access to an EOA. There is no in-between.

With account abstraction wallets, one could design a multi-signature system where a transaction can only be executed if two or more users sign it. Additionally, options of adding users who can only make limited payments to a particular collection of wallets within a given time frame also exist.

Future of account abstraction

Account abstraction transforms cryptocurrencies and Web3 wallet accounts to enhance the user-experience. It shifts away from the current simple EOA account model, which poses risk of total loss from minor errors. 

Instead, it envisions a future where accounts are customizable through smart contracts, aligning them better with individual needs. It creates a new paradigm in cryptocurrency management with the power to fuel Web3 toward mass adoption. 

Written by Shailey Singh

Related Articles

Responses