What Is ERC-4337, or Account Abstraction for Ethereum?
Əsas səhifə
Məqalələr
What Is ERC-4337, or Account Abstraction for Ethereum?

What Is ERC-4337, or Account Abstraction for Ethereum?

Intermediate
Dərc edilmişdir Mar 17, 2023Yenilənib Dec 11, 2023
7m

TL;DR

ERC-4337 is an Ethereum standard that achieves account abstraction on the protocol without any consensus-layer changes. Deployed on the Ethereum mainnet in March 2023, ERC-4337 makes it possible to transact and create contracts in a single contract account. It opens the door to user-friendly crypto wallet designs that could potentially facilitate broader adoption.

Introduction 

The Ethereum Improvement Proposals (EIPs) describe standards such as core protocol specification and contract standards for the Ethereum platform. Ethereum Request for Comment (ERC) is one type of EIP that sets application-level standards such as contract and token standards. An EIP can only become an ERC once the on-chain governance authorizes the change.

ERC-4337 is the latest ERC standard deployed on the Ethereum mainnet to achieve its long-awaited goal of account abstraction. Some still refer to ERC-4337 using its original term, EIP-4337. However, EIP-4337 was initially proposed in 2021 and has been authorized to become ERC-4337 in 2023.

What Is ERC-4337? 

ERC-4337 was proposed by Ethereum co-founder Vitalik Buterin and other developers in 2021 to establish account abstraction. It was deployed on the Ethereum mainnet in March 2023 and is expected to herald user-friendly crypto wallet designs. 

In Ethereum, account abstraction aims to combine features of the protocol’s two existing account types: Externally owned accounts (EOA) and smart contract accounts. The outcome is a single contract account able to transact with tokens and create contracts at the same time. This change makes creative wallet designs such as social recovery, customization, and upgradeability possible.

Another way to think about ERC-4337 is that it brings smart contract functionality to wallets in a single account. This makes services like multi-factor authentication and automatic payments easier to set up.

Why Is ERC-4337 Needed? 

To see why ERC-4337 is needed, it’s important to understand why it was proposed and implemented in the first place. Unlike the Bitcoin network’s Unspent Transaction Output (UTXO) module, the Ethereum protocol uses an account-based model. That means the Ethereum protocol keeps track and updates accounts’ available balances as transactions are confirmed.

The two types of accounts in Ethereum have their own functionalities. EOAs are owned and controlled by users, while smart contract accounts are smart contracts that are deployed on the network. Both accounts can receive, hold, and send ether or tokens.

Most existing crypto wallets on Ethereum, such as MetaMask, are EOAs, meaning they are limited by the rules set around EOAs. These limitations include solely relying on private keys to access accounts and requiring all transactions to be signed. Because of this, wallet setup procedures and private key security measures are usually complex and not user-friendly. If users lose their seed phrase, it usually means losing access to the wallet.

ERC-4337 removes such limitations. Smart contract wallets such as UniPass and Safe, are wallets managed by smart contract accounts instead of EOAs and can achieve the same goal. However, users must manage their ether in two accounts to pay for gas or rely on a centralized relay system. ERC-4337 removes such limitations because it combines the two account’s functionalities into one, making it easier to deploy desired wallet features.

How Does ERC-4337 Work?

The Ethereum community has been working on ways to achieve account abstraction for a long time. Before EIP-4337, the community put forward another proposal aimed at achieving account abstraction called EIP-2938. EIP-2938 was similar to ERC-4337 but called for consensus-layer changes. ERC-4337 circumvents this.

It does so by introducing a higher-layer pseudo-transaction object called a UserOperation, which shares similarities to rollups as both involve different versions of the concept of bundling. In ERC-4337, different users send UserOperation objects into a separate mempool.

Bundlers package these objects into a transaction, which gets included in a block. The bundlers pay gas for the bundled transactions and get paid fees by the individual UserOperation executions. Bundlers work in similar ways to a validator, choosing which objects to include based on fee-prioritization logic.

New functions, including validateUserOp, are also being added to enable a wallet to be a smart contract at the same time. A new contract called the EntryPoint is also being introduced to serve as a security gate for the execution of these new functions.

What Goals Does ERC-4337 Achieve? 

The goals ERC-4337 aims to achieve include the following: 

Account abstraction: Allow users to enjoy a single account with functionalities of smart contracts and EOAs. 

Decentralization: Allow any so-called bundlers to participate in the process. 

Avoid consensus changes: Make faster adoption possible as the Ethereum consensus layer focuses on scalability-oriented upgrades.

Enable innovative use cases: These could include aggregated signature, setting daily transaction limit, emergency account freezing, whitelisting, and privacy-preserving applications.

Save time and gas: As bundlers can package UserOperation objects into one transaction, it could save time and gas.  

What Does ERC-4337 Mean For Users? 

ERC-4337 could spell the end for the complicated crypto wallet user experience and, in doing so, could also increase adoption. Here are some highlights of what ERC-4337 could enable: 

Wallet setup: No need to write down seed phrases. Setup can be quick and easy with just a few clicks.

Worry-free account recovery: Users no longer need to sweat over losing their seed phrases, as multi-factor authentication and account recovery are now possible. 

User-friendly wallet functions: Users can enjoy a wide range of customized services including auto-pay, pre-approve transactions, and bundled transactions. The sky's the limit. 

Better security: Wallets could potentially be more secure as the possibility of human error is reduced — no more hiding seed phrases under your mattress! ERC-4337 should, in theory, lead to a smoother and friendlier user experience for users, therefore removing one major hurdle for mass adoption.

Gas flexibility: Wallets powered by ERC-4337 can now pay gas fees with any ERC-20 tokens and beyond. Developers can build wallets that make paying gas fees in any tokens and even fiat possible. 

Closing Thoughts 

The terminologies of crypto wallets – such as seed phrases, private keys, and public keys – can be daunting for new users. The process of using crypto wallets is still challenging for some people. Many agree that the average user’s crypto interface needs to be as simple as possible to accelerate adoption.  

ERC-4337 lays down the technical foundation to support creative crypto wallets. What developers can build based on this could change the main touch-point between crypto and users. Regardless, the impact that ERC-4337 will have on user experience and crypto as a whole is something to keep an eye on in the coming years. 

Further Reading:

An Introduction to ERC-20 Tokens

What Is Ethereum?

What Is the Ethereum Shanghai Upgrade and How Will It Affect Me?

What Is EIP-4844 in Ethereum and How Can It Benefit Users?

Disclaimer and Risk Warning: This content is presented to you on an “as is” basis for general information and educational purposes only, without representation or warranty of any kind. It should not be construed as financial, legal, or other professional advice, nor is it intended to recommend the purchase of any specific product or service. You should seek your own advice from appropriate professional advisors. Where the article is contributed by a third-party contributor, please note that those views expressed belong to the third-party contributor and do not necessarily reflect those of Binance Academy. Please read our full disclaimer here for further details. Digital asset prices can be volatile. The value of your investment may go down or up, and you may not get back the amount invested. You are solely responsible for your investment decisions, and Binance Academy is not liable for any losses you may incur. This material should not be construed as financial, legal, or other professional advice. For more information, see our Terms of Use and Risk Warning.