Account Abstraction EIP ERC-4337

Account Abstraction: Ethereum's Gateway to Widespread Adoption

Public and private keys, bridging, selecting which chain to be on, it's all too complex for most people and is blocking us from reaching mass adoption. We now have a solution called Account Abstraction! In this article, we take a good look at the possibilities of this new innovation and explore the leading projects.


What is Account Abstraction?

You've probably been down this path at some point. You get excited about a brand new crypto dApp or token that can only be accessed via a blockchain. You try to convince your friend to get in, but as soon as they have to start using a wallet like MetaMask, it's end of story.

The user interface and user experience (UI/UX) of most dApps as of now are, well, wonky. It’s almost like every single time you want to do anything related to the blockchain, you are solving the world’s greatest mystery.

Well, things might take a turn after this, as a new and promising innocation called Account Abstraction is rapidly become a reality. This comes after the announcement of the fact that the token standard ERC-4337 is now live on the Ethereum mainnet and various new Layer 2 blockchains like ZKsync, Arbitrum and StarkNet.

But, what’s the deal with ERC-4337? In this article, we discuss that and more.

We’ll start off with a brief introduction of Ethereum accounts, which is a pre-requisite knowledge to understanding why ERC-4337, followed by your typical day-to-day interaction with Ethereum. Last but not least, we’ll dive into ERC-4337 and its possibilities.

Ethereum Accounts

Ethereum has two different accounts; an externally owned account (EOA), and a contract account that is required for your day-to-day transactions on the Ethereum network.

The regular account that you have, such as the ones that you created using Metamask or other wallet providers, are externally owned accounts (EOAs). If you recall creating these accounts, it cost you nothing, and you have a private key, which you need to store and keep safe, and a public key, which is the address that is available to the public, to identify you.

You then would use these EOAs to then sign transactions for your day-to-day interactions, such as buying an NFT (ERC-20), sending tokens (ERC-721), and interacting with smart contracts to do a myriad of things.

On the flip side, we have contract accounts (CAs), which are basically your smart contracts. These accounts don’t have a private key, and if you were to deploy on a smart contract or a contract account on Ethereum, you would have to pay a gas fee to “initiate” these accounts. Also, because these contracts are controlled by the code, no one user can control these accounts.

For example, if you code a smart contract, or a contract account to send a user 1 NFT, if a user provides 0.1 ETH, the contract account is bound to what it does.

Accounts and Account Abstraction
Source: https://medium.com/0xmantle/account-abstraction-and-what-it-means-for-dapp-users-and-developers-218736501168

Your day-to-day interactions with Ethereum

If you’re an experienced user or degenerate that uses many chains frequently, then transacting using an EOA like Metamask might be a breeze for you.

However, for newer users, the learning curve is a pure nightmare.

Trying to keep your seed phrase safe, while making sure that you don’t accidentally press “approve” which causes all of your funds to be withdrawn from your wallet, and learning about the ridiculous “gas fees” or transaction fees that are required for a simple transaction, to learning about how to bridge your funds from one chain to another… and that’s not all, the list goes on.

A picture of a meme for phishing links  - enter account abstraction
How it feels telling your brain to not click on links, to keep your private keys safe

Furthermore, EOAs are also limited in terms of capabilities.

Apart from just sending transactions between wallets, or known as EOA to EOA transactions, the only other thing that you can do with EOAs is… well, EOA to Contract Account transactions, or in other words, interact with one smart contract at a time.

It sounds pretty confusing, I know, but let’s shine a light on this by outlining the steps you would take, where you might want to use smart contracts to extend the capabilities of your funds; a case where you want to set aside a maximum purchase of $1,000 USDC a month to buy a particular token through a smart contract that is focused on dollar-cost averaging (DCA).

  1. Open your MetaMask wallet
  2. Make sure you have enough funds for both gas and transaction
  3. Realize that you have enough funds… but it’s $750 USDC and $500 worth of ETH
  4. Swap $250 ETH to USDC on Uniswap
  5. Approve contract to allow Uniswap to use your ETH
  6. Approve contract to swap ETH to USDC
  7. Wait for transaction to come through
  8. Go to the DCA contract
  9. Approve contract to transfer your USDC to DCA contract
  10. DCA contract does the rest

“But can’t we just do it manually?” — to that I say, yes, you could whip out a calculator and price chart every month to calculate it, but then again, what’s the point of smart contracts?

Essentially, it took you 8 steps by using an EOA account to interact with 2 different contracts, all the while, while making sure that you have enough gas fees to cover it all.

Why account abstraction is key: A picture of a meme for the amount of steps required to make a transaction
That feeling while you wait for transactions to go through

Now, what if… we could combine EOA and Contract Accounts? This would supercharge accounts, and make interacting with the blockchain a more seamless experience, right?

Well, meet the infrastructure that will allow for this to happen, account abstraction.

ERC-4337, what is it?

In simple terms, ERC-4337 is an implementation that allows for the abstraction of these account functions (account abstraction), without needing to meddle with the core Ethereum codes.

Without going into too much technical details, how ERC-4337 works, and allows the abstraction of account functions, is by creating an alternative mempool, or what we would call waiting room for transactions. Following which, these are the steps that these transactions would go through:

  1. These transactions would then be bundled up, by nodes on the Ethereum Network, or known as bundlers, who would then bundle up all of these transactions and send it as a “bundled transaction”.
  2. The “bundled transactions” would be sent to a single smart contract that handles, validates and executes these transactions, known as an “EntryPoint”.
  3. (Extra Technicality) For those who are wondering about the technical terms, once the bundled transactions have been packaged by the bundler, it is sent to the “EntryPoint” and the bundler will call these functions: “HandleOps”, “ValidateUserOp” and “Execute”.

Apart from just these functions which abstracts away the account functions, one other cool extension with the ERC-4337 implementation, is the addition of paymasters. Paymasters, as the name suggests, are people who can sponsor transaction fees for other users — which opens up a plethora of economical game theories behind incentivisation for application usage, and much more.

How will this work in real day-to-day transactions?

To make understanding why implementing ERC-4337 is going to be an important step for the future of the blockchain space, let’s implement account abstraction into our previous example, where a user interacts with a DCA smart contract.

Now, let’s assume that the creators of the DCA smart contract see ERC-4337, and implement it, and you, as a user, want to set aside a maximum purchase of $1,000 USDC a month to buy a particular token. As a user, here are the steps you might take:

  1. Choose your token to DCA into, and set minimum and maximum price
  2. Set maximum amount per month
  3. Let DCA contract do the rest

On the backend, with ERC-4337, the various transactions required, such as the fact that you only have $750 USDC and $500 worth of ETH, and would need to swap it, and more would be bundled up into one transaction, which abstracts away all the clunky functions of the current EOA implementation of a wallet.

At the end of the day, ERC-4337 makes the flow of transactions from a user perspective logical.

What other things are possible with ERC-4337?

ERC-4337 allows for a plethora of use-cases that are much more logical, which provides users a more beautiful and smooth user experience when interacting with the blockchain. It’s definitely not the end-goal of account abstraction, as this change only abstracts away the account functions.

But future applications who leverage on ERC-4337 to build their applications could make:

  1. Entry points to the blockchain much more logical, without the need for private keys upon wallet creation, as they will be able to do it under the hood.
  2. Wallets with customizable safeguard rails, such as maximum transaction amounts per week or month, and daily limits.
  3. Financial applications with the focus on ease-of-use, such as automatic subscriptions and/or tiered permission controls.
  4. With the first three, would allow for session keys to be viable as it will be secure, for other sectors of the blockchain such as gaming and/or interactions with the metaverse.

Leading projects using Account Abstraction

Following is an overview of various projects that are working on or have already integrated account abstraction:

ArgentX

Argent X is a smart contract wallet that stands out as a leading wallet on both the Starknet and ZkSync platforms. It offers features such as account recovery, gas fee token flexibility, and support for altcoins and staking tokens. Argent X is the second offspring of Argent, an established wallet application with millions of users on Ethereum.

StarkNet and ZkSync

Layer-2 solutions like StarkNet and ZkSync are enhancing usability and security by introducing native account abstraction. These projects aim to improve the user experience and make managing blockchain accounts and custodying crypto assets easier and safer.

Avocado Wallet

Avocado is another account abstraction wallet that provides users with flexibility and control in managing their digital assets. It offers features such as safe sequence, web app support, and hardware wallet integration.

PerpDEX

PerpDEX is a decentralized exchange that utilizes account abstraction to enhance transaction efficiency and foster decentralization, a cornerstone of Web3.

WINR protocol

The on-chain gambling protocol WINR also uses account abstraction. According to the WINR Protocol documentation, the shared account abstraction model provided by the WINR Chain revolutionizes the user experience for web3 iGaming platforms. This shared account abstraction allows users to effectively manage their balances across different platforms. 

Conclusion

So, that’s pretty much all you need to know about ERC-4337! In this post, we’ve outlined a basic understanding of Ethereum accounts, followed by your typical day-to-day interaction with Ethereum and the basics of ERC-4337.

The possibilities are endless with account abstraction, and we at Flagship are excited to see what developers will make out of this.

Disclaimer: Nothing on this site should be construed as a financial investment recommendation. It’s important to understand that investing is a high-risk activity. Investments expose money to potential loss.

Title

$12.345

Short description

Read more
Go to outpost

Get 100,000 points by playing our crypto game!

Join our Telegram investment game now and receive 100k points. Unlock boosters, invite your friends and climb the leaderboard to earn even more!

Jump aboard