What Is ERC-4337? Account Abstraction Explained
ERC-4337 lets Ethereum wallets act like smart contracts, so users can pay gas in other tokens, recover accounts and batch actions. Here is how it works.
On this page
Short answer
ERC-4337 is an Ethereum standard that lets a wallet be a smart contract instead of a single private key. It introduces UserOperations, which describe what a user wants to do, and an EntryPoint contract that checks and runs them. Bundlers collect these operations and submit them on chain, while paymasters can sponsor the gas fee.
What is ERC-4337?
ERC-4337 is an Ethereum standard that turns a wallet into a smart contract account, so the wallet itself can hold the rules about who may spend, how much, and under what conditions. It is often called account abstraction, because the account no longer has to be a single private key held by one person.
Ordinary Ethereum wallets are externally owned accounts. They are controlled by one private key, and if that key is lost, the funds are gone. A smart contract wallet built on ERC-4337 can instead use several signers, a daily spending limit, a recovery process, or a time lock. The rules live in the contract, not in a single key.
ERC-4337 is a standard, not a change to Ethereum itself. It works on top of the existing network through a set of contracts that anyone can use, which is why wallets could adopt it without waiting for a network upgrade. If you are new to the underlying idea, what is account abstraction explains the concept in more detail.
How does ERC-4337 work?
ERC-4337 works by replacing the usual signed transaction with a UserOperation, a message that describes what the user wants the wallet to do. The user signs this message, and a bundler collects it with others and submits them together to the EntryPoint contract.
The flow has four parts. First, the user creates and signs a UserOperation, such as sending tokens or calling a contract. Second, a bundler gathers UserOperations from many users into one bundle. Third, the EntryPoint contract checks each operation, verifies the signature against the wallet's rules, and runs it. Fourth, the bundler is paid the gas fee for submitting the bundle.
The key point is that the wallet contract checks the signature, not the network. That is what allows a wallet to accept several signers, a social recovery process, or a session key that only works for one application. The EntryPoint is a single shared contract, so every wallet built on the standard follows the same flow.
What problems does ERC-4337 solve?
ERC-4337 solves the problems that come from wallets being tied to a single private key. Losing a key, paying gas only in ether, and approving one transaction at a time are all limits of the old model, and each one has a direct fix in the standard.
| Problem with a normal wallet | What ERC-4337 makes possible |
|---|---|
| One lost key means the funds are gone | Recovery through trusted contacts or another device |
| Gas must be paid in ether | A paymaster sponsors gas or accepts another token |
| Each action needs a separate transaction | Several actions batched into one UserOperation |
| No spending limits or session keys | Rules in the wallet contract, such as daily limits |
| Seed phrases are hard for new users | Sign-in with a passkey or a familiar login method |
These fixes matter most for applications that want ordinary users, not only experienced crypto users. A game or a shop can sponsor gas and let a user approve one batched action instead of several separate transactions. That removes two of the biggest points of friction in using a wallet.
What is a smart contract wallet?
A smart contract wallet is a wallet whose logic is a program on chain, so it can enforce rules that a normal wallet cannot. It can require two of three signers, limit spending per day, allow a trusted contact to start recovery, or let a session key work only for one application and only for a week.
Smart contract wallets existed before ERC-4337, but each one used its own method for getting transactions on chain. ERC-4337 gives them a shared standard, so a bundler can serve many wallets and a paymaster can sponsor gas for any of them. That shared infrastructure is what makes the wallets practical to build and support.
The trade-off is cost and complexity. Deploying a wallet contract costs gas, and the wallet depends on bundlers and the EntryPoint contract working correctly. Teams building wallets usually start with a clear list of the rules their users need, then pick the simplest wallet design that provides them. How to implement account abstraction covers the build decisions in more detail.
What are bundlers and paymasters?
Bundlers and paymasters are the two supporting roles in ERC-4337. A bundler collects UserOperations from users and submits them to the EntryPoint contract in a batch. A paymaster is a contract that agrees to pay the gas fee for a UserOperation, either in full or in another token.
Bundlers do the work that a normal wallet does when it sends a transaction. They check that each UserOperation is well formed, simulate it to make sure it will not fail, and include it in a bundle. They are paid from the gas fee attached to each operation, so they need the bundle to be profitable to submit. Anyone can run a bundler, and several services offer bundling as a hosted service.
Paymasters change who pays for gas. A business can sponsor gas for its own users, so a first-time user does not need ether before trying an application. A paymaster can also accept payment in another token, converting it to ether behind the scenes. The paymaster sets its own rules, such as a maximum gas price or a limit per user, and it can stop sponsoring at any time.
Example (hypothetical): a shop that sponsors gas for first-time buyers
Example (hypothetical): a small online shop sells digital collectibles and wants buyers who have never used a wallet. Each buyer gets a smart contract wallet when they sign up with a passkey, and the shop runs a paymaster that sponsors gas for the first three purchases.
A buyer picks an item priced at 20 tokens and confirms the purchase. The wallet builds one UserOperation that approves the token spend and buys the item in a single batch. The bundler submits it, the EntryPoint checks the passkey signature, and the paymaster covers the gas. The buyer sees one confirmation and no gas fee.
The numbers work like this. Suppose 500 buyers each make 3 sponsored purchases, and each purchase costs 0.002 ether in gas. The shop pays 500 times 3 times 0.002, which is 3 ether in total, or 0.006 ether per buyer. If the average order is worth far more than 0.006 ether, the sponsorship is a small cost for removing the biggest barrier to a first purchase.
What are the common mistakes?
The most common mistakes with ERC-4337 are treating it as a complete wallet solution, ignoring gas costs, and adding rules that users do not understand.
- Assuming the standard fixes security on its own. A smart contract wallet is only as safe as its code and its rules. A badly written recovery rule can be worse than a lost key.
- Ignoring bundler costs. Bundling and EntryPoint calls add gas on top of the action itself, so small actions can become expensive.
- Overcomplicating the wallet. Every extra rule is another thing a user must understand and another path that can fail.
- No fallback when a paymaster stops. If sponsorship ends, users need ether and a clear message explaining why.
- Skipping the recovery test. Recovery that has never been tested in practice is not a safety net.
Key takeaways
- ERC-4337 turns a wallet into a smart contract account with programmable rules
- UserOperations, bundlers and the EntryPoint replace the usual signed transaction
- Paymasters can sponsor gas or accept payment in another token
- Recovery, spending limits and batched actions are the main practical gains
- The standard adds gas cost and complexity, so start with one feature
Frequently asked questions
Is ERC-4337 part of Ethereum itself?
No. ERC-4337 is a standard built on top of Ethereum using smart contracts, not a change to the core protocol. It works through the EntryPoint contract, bundlers and paymasters, so wallets can adopt it without a network upgrade.
Does ERC-4337 remove gas fees?
No. Gas is still paid for every on-chain action. ERC-4337 changes who can pay it and in what token, because a paymaster can sponsor the fee or accept another token. The underlying gas cost remains.
What is the difference between ERC-4337 and account abstraction?
Account abstraction is the general idea of wallets as programmable accounts. ERC-4337 is one standard that implements it on Ethereum using UserOperations and an EntryPoint contract. Other designs exist, but ERC-4337 is the widely used one.
Can I use my existing wallet with ERC-4337?
Only if the wallet supports smart contract accounts. A normal wallet controlled by a single private key cannot use ERC-4337 features directly. You would need to create a new smart contract wallet and move funds to it.
What is a bundler in ERC-4337?
A bundler collects UserOperations from many users, checks that they are valid, and submits them together to the EntryPoint contract. Bundlers are paid from the gas fee attached to each operation, and anyone can run one.
Is ERC-4337 safe to use?
The standard itself has been reviewed and is used in production, but safety depends on the specific wallet contract and its rules. Check who audited the wallet, how recovery works, and whether you can export your keys before moving significant funds.