mobileRumblefishLogo
Menu
desktopRumblefishLogo
Services
Products
Case studies
Careers
Resources
About us
What is Account Abstraction and Why is It Important? EIP-4337 Explained

What is Account Abstraction and Why is It Important? EIP-4337 Explained

Thu, Feb 29, 20247 min read

Category: Business stories

Account abstraction in Ethereum represents a groundbreaking shift in how users engage with decentralized applications (dApps). It introduces a novel paradigm where assets can be exclusively held by smart contracts rather than externally owned accounts (EOAs). At the heart of this innovation lies the ERC-4337 standard, which unlocks the potential of smart contract crypto wallets on the Ethereum blockchain.

This article delves into Ethereum's account abstraction, exploring how it redefines user experiences with smart contract wallets and understanding the ERC-4337 standard within the Ethereum ecosystem. Let's dive into the history, evolution, and benefits of account abstraction, and its implications for driving a Web3 revolution.

Back to the basics and why do we need Account Abstraction

To get to the bottom of Account Abstraction we need to take a few steps back and look into two main types of accounts on Ethereum:

  • EOAs (Externally Owned Accounts) - used to store and transfer ETH, ERC-20 tokens, and other digital assets. They are controlled by an Elliptic Curve Digital Signature Algorithm (ECDSA) key, which is cryptography used to sign and verify digital transactions and involves generating a private key and a corresponding public key. (We’ve previously written more about ECDSA here). EOAs are managed using a public-private key pair, where the public key is the 64-byte (128 hex character) from which the network address (20-bytes) with the added prefix 0x is derived and is used by others to identify the account for a transaction. The private key is a mathematical key (kept secret by the holder) used to sign transactions and should be known only to the owner of the EOA. Basically, EOAs can only perform two operations: transfer native tokens to other externally owned accounts, and initiate transactions that prompt the execution of another smart contract transaction. This mechanism opens an account to many vulnerabilities and limitations, poor security being the most crucial one. If the account owner loses the private key and seed phrase, they may lose access to all their assets. There is no social recovery mechanism, no spending limits to set, and no 2FAs to add. 
    Another drawback of EOAs is the lack of customization - owners must sign every transaction manually. On top of that, the EOA owner must possess ETH to cover gas fees. All of those make for an unsatisfying user experience, not very welcoming for users outside the Web3 world.
  • Smart Contract Accounts (SCA) - in the simplest terms SCAs are smart contracts functioning as crypto wallets. They are fully programmable and are not controlled by a private key but by a customizable verification logic which opens the way to a variety of new possibilities. SCAs enable transaction customization and add extra features to the wallet, but due to the fact they don’t have a private key and/or seed phrase they cannot initiate transactions. The execution of a specific action is only possible when the smart contract code is triggered by a transaction from an Externally Owned Account (EOA). This basically means that users have to keep an EOA topped up with some ETH (or other native token) to run a contract account. So, dealing with a contract account ends up being even more of a hassle compared to handling a standalone EOA.

Enters… account abstraction! Account abstraction, a concept described in the ERC-4337 proposal, offers a new approach where a smart account can be tailored to specific user needs using smart contracts but without the need for an existing EOA account. How is that possible? Let’s dive a bit deeper! 🐟

Introducing UserOperation, Bundlers, and Paymasters

EIP-4337 introduced a couple of new features that enabled major upgrades all without any required changes to the Ethereum protocol. One of the said features is a new object type called UserOperation. Instead of shooting off regular transactions like an EOA would, UserOperation can handle operations on behalf of users. UserOperation objects carry data and multiple instructions to execute smart contract calls initiated by the smart contract account. They're then dispatched into a dedicated mempool where validators, referred to as "bundlers", gather them up into a "bundled transaction”. A bundler monitors the special mempool designed for UserOperation objects, bundling them into a single transaction sent to the EntryPoint contract. They receive compensation in the form of a portion of the gas fees for this service. Bundlers play a vital role in the account abstraction workflow because EAOs are still required to initiate all Ethereum transactions. Moreover, all bundlers possess EOAs, making them the sole participants needing them within this account abstraction ecosystem. This approach effectively abstracts the necessity for every Web3 participant to have their own EOA. Et voila!

A moment ago, we mentioned an EntryPoint contract. EntryPoint, as a smart contract, receives transactions from bundlers and handles the verification and execution of UserOperations. In the verification phase, it checks if the wallet holds sufficient funds; if not, the transaction is rejected. For execution, EntryPoint executes UserOperations by invoking the smart contract wallets with the call data of the operations. Additionally, EntryPoint deducts funds from the account to reimburse the bundlers.

Another new addition, introduced in EIP-4337 proposal is Paymaster, tasked with managing gas payment policies. These policies offer options on who foots the gas bill and how it's done. As a result, users aren't obliged to hold the native ETH token to engage with the network anymore. It’s a significant improvement for new users, entering the world of Web3 for the first time. 

Benefits of Account Abstraction

Now that we have a basic understanding of how Account Abstraction works and what mechanisms it utilizes, we can focus on what it actually brings to Web3 users.

Improved security

Right now, Ethereum accounts rely on a seed phrase and private keys to handle transactions. If that seed phrase takes a hike, there's no getting your accounts back, setting spending limits, adding whitelist accounts, or freezing accounts for extra security measures. But with Account Abstraction, developers can get crafty and program all sorts of options for account authentication and recovery. 

Lower barrier to entry

For folks who aren't familiar with blockchain, understanding the ins and outs of EOAs can pose a challenge. Properly managing and protecting their keys can be complex and leave them susceptible to vulnerabilities. However, thanks to Account Abstraction, developers have the flexibility to implement different logic to integrate security features and allow users to customize how they process and authenticate transactions.

Enabled customization and automation

When it comes to the current externally owned account (EOA) setup, users are stuck with transactions that can't be customized or automated. Each one has to be signed off individually. But with account abstraction, the game changes. Now, users can set up recurring payments and dive into other forms of automation
With EOA, you need to approve and authorize each transaction one by one. Imagine if you're into gaming or anything that involves a lot of transactions – it's a real time-suck and not all that convenient. But with Account Abstraction, things start looking up. You'll be able to greenlight multiple transactions with just one go, kind of like bagging a bunch of items with a single payment. 
Account Abstraction empowers developers to craft "wallets" that are non-custodial yet deliver a straightforward, intuitive, and dependable experience for end-users. DeFi apps can sport a user interface reminiscent of banking apps, where users are relieved of concerns regarding key management, gas fees, and other complexities. That's the ticket to making life easier for users diving into Ethereum and Web3 apps!

Upgraded gas fee management options

Remember Paymasters from earlier? Thanks to this feature, smart account users can cover gas fees with any ERC-20 token they fancy. Plus, anyone can chip in to foot the bill for someone else's transactions, dApps can even cover their users' gas fees as a thank-you, sponsorship, or just to keep things smooth sailing for users hopping onto their app. That’s the customer-first approach we all love!

Conclusion

In summary, Ethereum's Account Abstraction marks a significant milestone in blockchain technology, offering users unparalleled flexibility and security. As developers delve deeper into its capabilities, the prospects for account abstraction appear promising, steering the evolution of Web3 toward widespread adoption.

In the next part of this series, we’ll take a look at the most promising projects powered by Account Abstraction, including one of our own - Devil Wallet, a mobile Web3 wallet utilizing EIP-4337. Stay tuned!

Agnieszka Dobosz
Agnieszka Dobosz

Head of Business Development

Categories
Follow Us