Onboarding users into the crypto realm is still a challenge. We have complex concepts like smart contracts, tedious working modules involving wallets, and restrictive infrastructure between centralized and decentralized entities to thank for that. Simply put, apart from trading crypto, hardly anything feels effortless to non-developers. Ethereum, in 2023, plans to change that with EIP-4337 and ERC-4337. Termed superchargers set to increase web3 adoption, EIP and ERC-4337 have one primary goal — to bring Smart Accounts to every web3 enthusiast.
This discussion aims to make ERC-4337 more lucid via simple and illustrative means. We delve into the technicals and jargon involving terms like account abstraction, Entry Point, and more, explaining each as clearly as possible, along with a real-world example.
Best Crypto Exchanges for Trading
Best for interest rates
Best for spot trading
Best for altcoins trading
- Unpacking EIP-4337 and ERC-4337
- The idea behind account abstraction: EOAs vs. Contract Accounts
- Why did ERC-4337 come into existence?
- Smart accounts trump smart contracts in account abstraction!
- Breaking the tech behind ERC-4337
- What does ERC-4337 mean for the users?
- Are there any loopholes associated with ERC-4337?
- What does that mean for Ethereum and the associated stakeholders?
- Will it be the year of Ethereum with ERC-4337?
- Frequently asked questions
Unpacking EIP-4337 and ERC-4337
One thing to note first is that EIP-4337 and ERC-4337 are often referred to interchangeably. But they are different. Here’s how.
Every technical change proposed to the Ethereum ecosystem initially starts as an EIP or an Ethereum Improvement Proposal. Once the on-chain governance model accepts, authorizes, and confirms the change, it becomes ERC or Ethereum Request for Comment.
So the change started as an EIP-4337 and has now turned into ERC-4337. Also, ERC is one element of the broader EIP space and primarily deals with protocol and development standards.
Definition of ERC-4337
ERC-4337 is an Ethereum standard (not necessarily a token standard) that aims to supercharge user accounts to smart accounts. A more technical way of defining it would be a means of account abstraction.
But why abstraction?
Abstraction can be termed ideation, meaning that with EIP-4337 or the current ERC-4337, Ethereum has plans to bring new ideas to user accounts. Or it can mean extraction or removal, allowing users to get rid of the legacy handling of user accounts like MetaMask — as per the focus on seed phrases, individual transaction signing, and overreliance on private keys.
In simple terms, with ERC-4337, the Ethereum ecosystem plans to bring the smart contract functionality to wallets. Or rather, it aims to make wallets synonymous with smart accounts — entities that can perform multiple tasks, handle multi-factor authentication, initiate and sustain crypto subscriptions, and more — all via code.
Here is everything that can be abstracted:
ERC-4337 in super simple terms
Imagine you own a traditional pocket wallet. One section is for cash, while others can be for credit cards, coupons, and more. Every time you want to make a cash transaction, you need to reach out only to the cash section for assistance. Scavenging through the credit card or the coupon section won’t help.
Now imagine that the pocket wallet is a smart wallet (account abstraction kind). There is only one section with a payment mechanism that gets accepted as cash, credit card, and even coupon. More like it becomes what you want it to be. If you reach out for cash, you get cash; if you reach out for a card, you get a card.
Something similar at the blockchain level is termed account abstraction. And while this is more of a blockchain-specific terminology, a more user-specific term would be smart accounts.
Here is how Biconomy defines account abstraction with another analogy:
History of account abstraction
The utility of ERC-4337 can be illustrated by the history of proposals related to account abstraction. Let us go through the attempts.
EIP-86: Proposed in 2016-17 with a focus on empowering smart contracts to initiate and approve transactions. Do note that the current generation of wallets (hardware, mobile, etc.) require account owners to sign off transactions.
EIP-2938: Proposed in 2020 with a focus on creating a new type of top-level account using address-specific smart contract creation and implementation.
EIP-3074: Another proposal to emerge in 2020. EIP-3074 would allow more efficient execution of smart contracts courtesy of a new opcode (smart contract building block). This proposal focused on delivering self-executing smart contracts.
Apart from these, even EIP-196 focussed on making smart contracts more efficient and even secure. However, all of these proposals focusing on some account abstraction didn’t go through. This is because they required changes to the consensus layer of Ethereum.
For the unversed, imagine the consensus layer as the backend, whereas the execution layer is like the front end of the Ethereum ecosystem.
EIP-4337 was proposed in 2021 and was eventually authorized in 2023 because it ensured zero consensus-layer protocol changes. Ethereum Foundation security researcher Yoav Weiss broke the news.
Imagine you want to cross from one side of a busy street to another. Instead of putting traffic signals and eventually asking the vehicles to stop, you create a flyover. This is positioned on top of the street as a higher infrastructure layer without changing the state of daily road-specific operations.
What’s better is that the Ethereum-specific flyover, EIP-4337 or now the ERC-4337, works with several Ethereum-specific streets or, rather, EVM-compatible ecosystems.
The idea behind account abstraction: EOAs vs. Contract Accounts
Now that we know a little about ERC-4337, let’s move to the motivations behind the adoption of its “Audited’ version onto the Ethereum mainnet.
Firstly, most of the existing wallets on Ethereum are EOAs or Externally Owned Accounts powered by third parties. These include the likes of imToken and MetaMask. While these are quite popular, the entire responsibility of controlling the account is on a user’s private key. If you lose the key, you can bid goodbye to your account and the funds inside it.
Even hardware wallets like Ledger Nano X and others have similar account-controlling mechanisms. ERC-4337 aims to change this, making accounts synonymous with powerful smart contracts.
And even though the likes of Argent and Gnosis already had smart account functionality, the transaction leg involving transaction fee payment was handled by centralized relays. However, with ERC-4337 and account abstraction, even that bit is now decentralized.
Here is a look at some comparisons between CAs vs. EOAs:
|Parameters |||CAs (Contract Accounts) |||EOAs (Externally Owned Accounts)|
|Set up||Depends on the wallet provider||Requires a seed phrase note down|
|Automation||Customizable||Only possible till a sign-off is required|
|Permissions||Customizable as per level (access control is allowed)||Private keys define everything|
|Bundled transaction||Approval and actual swaps can be batched together. Other transactions can also be batched.||Every act requires a sign-off|
|Limits||Custom spending can be set||No automation in regards to limits|
|Account recovery||Any encoded logic can be set to recover keys. Yours can be as simple as an email with a recovery code.||Only seed phrases can help you with recovery.|
Why did ERC-4337 come into existence?
And if you are looking for some more specific reasons why ERC-4337 came to be, here are a few:
- Zero reliance on seed phrases.
- Standard user-onboarding using mobile devices.
- Smart contract wallets reduce the chances of human error.
- Changes are easy to implement on other chains that are Ethereum Virtual Machine compatible.
- The flexibility of activating bank-like features like auto-pay, account recovery, and multi-factor authentication.
- Compatibility with future signature schemes like BLS (Boneh-Lynn-Shacham) and Quantum resistance, making the network less prone to attacks.
Overall, ERC-4337 would help further the concept of “Trustless Banks.”
Smart accounts trump smart contracts in account abstraction!
Smart contracts have never been very user-specific. They govern features and functionality but in an ecosystem or protocol-specific manner, courtesy of DeFi applications, NFT marketplaces, DAOs, and other entities.
The only way users could interact with the blockchain-specific smart contracts was by using their EOAs, or Externally Owned Accounts like Metamask. From sending funds to a DeFi pool to transferring NFTs to a marketplace to sell to bridging accounts with other chains, every act using EOAs still requires individual transaction signing.
And while many crypto natives of us have made peace with this process, what about total beginners and older generations? Most wouldn’t enjoy setting up and using an EOA when they already have already experienced the ease of traditional banking.
Here is what the flow looks like to a new user:
And that brings us to the concept of Smart Accounts, which make your existing wallets act as breathing and self-executing smart contracts.
Unlike smart contracts, ERC-4337-powered Smart Accounts come with the following user-specific benefits:
- They make your mobile hardware as efficient as a hardware wallet, courtesy of reimagined cryptographic key storage.
- Multiple Account Recovery options like a standard google or even a bank account.
- Seed phrases, account managing code, and other developer-specific traits go under the hood, making the UX clean and accessible.
- The relay system used in this case is decentralized, making them more secure and censorship-resistant.
- This innovation amalgamates every other aspect of Account Abstraction envisioned by other EIPs.
And these are just a handful of benefits that you can associate with smart accounts.
Breaking the tech behind ERC-4337
Unless you are an Ethereum developer, you need not lose a lot of sleep over the technical aspects of EIP-4337 or, rather, ERC-4337. But for those interested, let’s briefly dissect the technology.
Here is a quick diagrammatic representation of the process:
Notice that there are four stages to the conclusion.
How does it work?
Here is a simple representation.
Stage 1: The user intent for a job is sent out as UserOperation — an entity corresponding to the users or even applications that want to ride the account abstraction bandwagon.
The UserOperation part is like unconfirmed transactions.
Stage 2: This involves bundling the UserOperation bits into an alternate mempool.
Note: An alternate mempool is like a waiting room for the ERC-4337 powered transactions handled by Bundlers (validators who earn incentives and move the transactions forward towards conclusion).
User Operations mempool can coexist with the standard mempool. Here is how:
Stage 3 is when the bundled transactions are sent across to the EntryPoint contract — a uniform piece of code for the blockchain’s reference. This is where the handleOps function delegates everything to the Entry Point smart contact. This contract eventually interacts with the user’s smart contract wallet in Stage 4.
The Entry Point contract calls a validateUserOp function to recognize and identify the UserOp with the contract wallet. The smart contract account (wallet) should implement the ExecuteUserOp function to ensure that the transaction concludes.
However, there are two things to notice here:
The “ETH Balance” element associated with the Smart Contract wallet can pay for the ExecuteUserOp fees. Any other ERC-20 token can also work. However, for a sponsored transaction, the PayMaster with ETH Balance helps validate by paying the gas fees.
Here is a simple visualization of the entire flow:
Also, there can be Signature Aggregators in play if it’s a multi-sign transaction.
A more technical version from Vitalik
Here is a rundown of all the important AA components.
Below is a more detailed representation of the Mempool, per Vitalik Buterin’s blog. Notice that the User Operations, as objects, keep moving in the flow, with bundlers handling everything till the Entry Point handover.
And it’s a process in reverse. Bundlers (the willing validators) pay the fees. They are compensated when the userOperation object is handled, validated, and executed by the Entry point or the singleton contract.
Also, the alternate mempool is in sync with Vitalik Buterin’s vision of a “decentralized fee market” for smart contract accounts.
What does ERC-4337 mean for the users?
Here comes the fun part. ERC-4337 makes it possible for almost everyone with a mobile to try out web3 and crypto. Here are some more specific benefits:
Account recovery and seamless wallet setup
For smart accounts, ERC-4337 is expected to bring in something called “Group-Access” wallets. This means if you lose your seed phrase, you can reach out to previously designated guardian contracts or accounts to help retrieve access.
Finally, there seems to be something beyond “Not your keys, not your crypto.” And this move would actually mean key abstraction, removing private key dependencies.
Also, if someone tries to set up a wallet post the ERC-4337, they won’t even have to write down the seed phrase to recover the account if needed.
Every transaction with EOAs requires sign-offs. And it can be tedious. With account abstraction, it can be possible to bundle transactions and send them as one to save time and even gas fees.
Say you are minting multiple NFTs or even playing a game that requires you to use your tokens (say SLP) across sessions. With these smart contract wallets, you can preapprove transactions per the predefined wallet code and session keys.
Sponsored transactions courtesy of Paymasters
Imagine you are minting something or initiating a demo transaction on behalf of the company. Or you are planning to set up a DApp that would allow users to go gas-free for, say first 30 days. This is possible via Paymasters, courtesy of smart contract wallets. You can simply use sponsored transaction, and the gas fees will be extracted from a different address upon confirmation.
And this brings us to another aspect of account abstraction: gas abstraction.
Any token gas
If you are paying gas fees using your own smart contract wallet, you can pay using any ERC-20 token with the account abstraction functionality. Plus, third-party services using ERC-4337 to create their onboarding services can make it possible to pay gas in fiat, courtesy of a smart contract enhancement.
This approach will speed up DApp interaction as no native tokens will be needed.
Accounts will become programmable. So, it will be easier to predefine and allow periodic spending as part of the wallet code to subscribe to compatible web3 services. And this will even give web3 membership plans the ability to turn to crypto-only subscription packages.
Multi-factor authentication and custom coding
First of all, the wallet code that defines your smart account will work seamlessly with your mobile device. So, if you have Face ID on your iPhone, you can set it as a means to authenticate certain transactions or scenarios. You can place similar guardrails for other usage tiers, depending on what kind of code you want to rely on.
Imagine this: every transaction initiated while the app is open gets preapproved. These types of customized instructions can be set with ERC-4337.
Custom spending and usage limits
Like with a credit card, users will be able to set usage instructions and alerts by placing limits. For instance, you can instruct your account to notify you whenever any DeFi service you are subscribed to becomes more than 100 USDT per month.
Automated DeFi and trading access
Moving to DeFi, you can instruct your smart account to push idle funds to a liquidity pool for earning yields. Or, if you plan on trading tokens or NFTs, you can program your smart account wallet to check specific marketplaces and exchanges for low-cost NFTs and coins. Plus, you can even set token tracking metrics and instruct an investment flow.
Here is a sample code that you can deploy if you are an Ethereum developer:
If you check this code, you will notice that it is an Auto Invest program that lets you invest anything in excess of 100 USDT to a yield-generating pool.
Note: You still need to feed your EOA address and the pool address to execute the code.
And even though a boilerplate like this automates the auto-invest part, there is a problem. In the case of EOAs, you will need to sign off the transaction once you receive the auto-invest prompt. Imagine you are not in front of the device and fail to sign off the transaction, missing out on some additional yield. AA accounts help move past this bottleneck.
In addition to the mentioned user-friendly offerings, account abstraction even makes way for the following:
- Fraud monitoring
- Replay attack protection
- Setting withdrawal limits (similar to banking)
- One-click experiences
- Self-custody but with more control
Are there any loopholes associated with ERC-4337?
While there are still a lot of things to learn about ERC-4337, we do know of some loopholes.
Ethereum network costs are still high. Despite the Paymaster-specific gas fee offloading and the option of the sponsored transaction, someone still needs to pay the fee in the end. Unless all the Ethereum Virtual Machine compatible scaling solutions and layer-2s do not start implementing ERC-4337, the cost will be an issue.
Even though contract accounts offer a lot more than EOAs, they do not allow key-based signatures — which is essential for first-time verifications. Even though EIP-1271 allows for signatures via smart contracts, implementation outside of the Ethereum chain can be tedious.
Massive infrastructure needs
Large-scale adoption of AA accounts would require more Bundlers, which is subject to massive infrastructure needs and technical know-how.
In case fewer Bundlers join the realm, the ability to move transactions forward will be in the hands of limited entities. This might even cause centralization concerns, albeit initially.
What does that mean for Ethereum and the associated stakeholders?
Overall, ERC-4337 could be a game-changer across verticals. For Ethereum, it might speed up the daily transaction volume and active addresses in time. Plus, with easy onboarding, the gas-fee-specific revenue generation might also start looking up.
DApps, including those focused on DeFi and NFTs, will also benefit, with user wallets able to be in sync with contracts. This means DApp developers will have to do very little. Yet, they can still choose to focus on making more chain-agnostic services, as the smart contract wallets will eventually have the ability to connect and interact across chains.
Builders looking to bring projects to web3 can make good use of ERC-4337 tooling to customize permissioned flows. This will eventually increase adoption. Do note that the Ethereum Foundation offers Wallet Contract APIs and the required SDK for third parties and builders to build using the ERC-4337 standard.
Here is how the proposed API works:
Will it be the year of Ethereum with ERC-4337?
The ERC-4337 is huge. It is no surprise that even the Shangai update (involving token unlocking) has been pushed to April. This isn’t the first time account abstraction has been envisioned. But the actual OpenZepplin audited version of the facilitator smart contract, or Entry Point, makes the ERC-4337 an implementation-grade win for the entire ecosystem. Yet, some believe that the timing of this move is an attempt to offset unstaking drama that could soon unfold.
In simple terms, with ERC-4337, anyone can start trading in NFTs, get crypto newsletter memberships, play web3 games easily, and create new smart account wallets. All without having to become a technical guru. Things are about to get much easier and more fun for the average user and more accessible for the crypto beginner. And yes, it might be wise to keep an eye on ETH prices in 2023!
Frequently asked questions
How are Ethereum transactions validated?
What is an Ethereum request for comment?
What are six of the standard fields of Ethereum transactions?
What is a smart contract in cryptocurrency?
Who confirms Ethereum transactions?
What are EIP and ERC?
In line with the Trust Project guidelines, the educational content on this website is offered in good faith and for general information purposes only. BeInCrypto prioritizes providing high-quality information, taking the time to research and create informative content for readers. While partners may reward the company with commissions for placements in articles, these commissions do not influence the unbiased, honest, and helpful content creation process. Any action taken by the reader based on this information is strictly at their own risk.