Crypto Newbie

Crypto Newbie / Simulators / Account Abstraction

Account Abstraction (ERC-4337) Simulator

ERC-4337 (deployed July 2023) makes Ethereum accounts programmable: pay gas in any token, have dApps sponsor your gas, use social recovery, batch multiple ops. This simulator runs UserOperation costs across paymaster modes (none / sponsored / ERC-20 payment / discounted) and shows bundler economics — who profits, when, and at what scale.

Your UserOperation

Paymaster config

Your cost

Raw gas cost

$17.5000

200,000 gas units

Paymaster markup

$0.0000

Total cost

$17.5000

Savings vs EOA equivalent

$-4.3750

Bundler economics

Total bundle gas used

1,650,000

Bundle cost to bundler

$144.3750

Total revenue (all UserOps)

$8.4000

Bundle profit

$-135.9750

Profit margin: -1618.8%

EOA vs Smart Account — the fundamental difference

An EOA (Externally Owned Account, e.g., MetaMask) is just a private key. The key signs transactions; that's it. Logic is hard-coded — no flexibility. A SMART ACCOUNT is a smart contract that holds your funds. Logic is programmable: multi-sig auth, social recovery, biometric login, daily spending limits, paymaster gas sponsorship, batched ops. ERC-4337 is the standard that makes smart accounts work without requiring an Ethereum hard fork. The trade-off: smart accounts cost 1.5-3× more gas (signature verification + EntryPoint dispatching). But UX wins are massive — paymasters alone solve the 'new user needs ETH to do anything' problem.

Paymaster modes — how gas gets paid

Four modes the simulator demonstrates. (1) None: user pays gas in ETH directly (cheapest, but requires ETH). (2) Sponsored: dApp covers gas via a paymaster contract — user pays $0 (great for onboarding; Base smart wallets do this). (3) ERC-20 Payment: paymaster accepts USDC/DAI/USDT, exchanges for ETH, user pays in stablecoin. (4) Discounted: paymaster offers discount to attract users (loss leader, paymaster eats the difference). Markup on ERC-20 modes (typically 5-15%) is the paymaster's revenue. Sponsored is free for users but costs the dApp.

Bundler economics — who pays for the bundle?

Bundlers are like miners for UserOps — they collect signed UserOps from a mempool, batch them into a single transaction sent to EntryPoint, and pay the gas. They earn priority fees from each UserOp. Economics: ENTRY_POINT_OVERHEAD (~50k gas) is amortized over the bundle, so a 10-UserOp bundle pays ~5k overhead per UserOp instead of 50k for singletons. Bundlers compete on speed (which mempool they monitor) and inclusion (which validator they have a relationship with). Big bundlers (Pimlico, Stackup, Alchemy) run at 80%+ margins; small bundlers struggle to break even due to ETH gas volatility.

Batched ops save gas vs separate transactions

AA's killer feature for power users: batched operations. Example: swap WETH → USDC, then deposit USDC into Aave. As 2 separate EOA txs: 400k gas total. As 1 batched UserOp: 350k gas. Why? The signature verification + state setup overhead happens once. For 3+ ops, savings grow. Major use cases: NFT minting + transferring in one tx (was 2 separate before), DEX swap + LP deposit (often 3 separate txs in old flow), multi-token approvals + single trade. Account abstraction adoption is largely driven by these UX wins.

Frequently asked questions

+Which wallets actually support ERC-4337 today?

Smart wallets (consumer-friendly): Coinbase Smart Wallet, Argent, Safe (formerly Gnosis Safe), ZeroDev, Biconomy, Particle Network. dApp-integrated: Base smart wallets are pre-built on every Coinbase app. Wallet libraries: ethers.js 6+, Viem, Permissionless.js all support sending UserOps. Most still aren't 100% mainstream — most users still on MetaMask EOAs, but smart wallets are growing 10-20% monthly especially on L2.

+Why doesn't every wallet just switch to ERC-4337?

Three reasons. (1) Cost — smart accounts pay 1.5-3× the gas of EOAs. For high-volume users on L1, this is a real expense. (2) Compatibility — many existing dApps still assume EOAs, so smart accounts need workarounds (or wait for dApp updates). (3) Recovery — if you forget your password but have social recovery set up, you need to wait for guardians to sign. That's safer than seed phrases but feels slower for users used to immediate access. The trend is clearly toward smart accounts but it's gradual.

+Can a paymaster steal my money?

No. Paymasters only have permission to SPEND gas on your UserOp — they can't move your other funds. The EntryPoint contract enforces this strictly: paymaster signs your UserOp's gas portion, but the operation logic is signed by you. Some paymasters charge for failed UserOps (you sign for gas before knowing if execution succeeds), so check the paymaster's policy before using.

+What's the difference between ERC-4337 and EIP-7702?

ERC-4337: requires deploying smart contract accounts (extra cost + complexity). EIP-7702 (in Pectra upgrade, May 2025): lets EOAs TEMPORARILY ACT LIKE SMART ACCOUNTS for a single tx, without deploying. You can do batched ops, social recovery, and paymaster gas with your existing EOA. EIP-7702 should accelerate AA adoption because it removes the deploy-new-wallet friction. ERC-4337 isn't going away — both work together. EIP-7702 is the bridge for existing users; ERC-4337 is the long-term smart wallet standard.

+Are bundlers centralized?

Currently yes — a handful of bundlers (Pimlico, Stackup, Alchemy, Coinbase) handle most volume. Anyone can run a bundler (the protocol is permissionless), but the economics favor scale. Risk: if all bundlers refuse to include your UserOp, you can't execute. Mitigations: multiple bundlers in your wallet's mempool, ability to fall back to direct EOA tx, censorship-resistance bundling efforts.