ERC-4337
Overview and breakdown of the core Account Abstraction standard using the alt mempool approach.
ERC-4337 is the foundational standard for Account Abstraction (AA) on Ethereum. It enables programmable, secure, and flexible smart wallets—without requiring any changes to the Ethereum consensus layer.
🚀 What Does It Enable?
Programmable smart wallets with custom auth (e.g., multisig, passkeys)
Gas abstraction using ERC-20 tokens or Paymasters
Account deployment on first use via
initCode
Bundled operations for better UX and gas efficiency
Signature flexibility, enabling recovery, guardians, and more
🧱 Key Components
🧾 UserOperation
UserOperation
A new object type representing user intent. Think of it as a structured meta-transaction.
interface UserOperation {
sender: address;
nonce: uint256;
initCode: bytes;
callData: bytes;
callGasLimit: uint256;
verificationGasLimit: uint256;
preVerificationGas: uint256;
maxFeePerGas: uint256;
maxPriorityFeePerGas: uint256;
paymasterAndData: bytes;
signature: bytes;
}
This structure is propagated through a separate UserOp mempool, not the legacy Ethereum transaction pool.
🚦 EntryPoint Contract
The singleton router that:
Calls
validateUserOp()
on the sender accountIf present, calls
validatePaymasterUserOp()
on the PaymasterExecutes the
callData
if validation succeedsHolds deposits for accounts, and deposits + stakes for paymasters
Smart accounts must explicitly trust a specific EntryPoint contract. During validation, wallets check msg.sender == EntryPoint
to ensure the operation is invoked through the correct entrypoint.
📦 Bundlers
Nodes that:
Monitor the UserOp mempool
Select and simulate valid
UserOperation
sSubmit bundles as part of blocks they build onchain
Bundlers assume the gas cost risk and are reimbursed by user accounts or Paymasters. They may apply local policies or reputation scoring (e.g., ERC-7562).
💰 Paymasters
Optional contracts that:
Sponsor gas for accounts under programmable conditions
Must stake and deposit ETH into the EntryPoint
Can enforce rules off-chain or on-chain (e.g., API-based validation)
If validatePaymasterUserOp()
succeeds, the Paymaster covers execution costs. If the operation fails, the Paymaster still pays the network fees.
🔎 Validation Flow
User sends
UserOperation
to a bundlerBundler simulates validation using EntryPoint’s
simulateValidation()
Checks signature, nonce, balance/stake, and paymaster logic
If valid, the bundler includes it in a bundle
Bundle is sent via
handleOps()
, andUserOperation
s are executed atomically
🔐 Security & DoS Protections
EntryPoint reverts with
FailedOp
if validation or execution failsBundlers must pre-simulate using
debug_traceCall
to avoid gas lossERC-7562 defines additional validation rules (e.g., no storage writes in
validateUserOp
)Only staked entities can access shared state during validation
🔄 Integration with Other Standards
EIP-7702 — Temporary delegation of EOAs to smart logic
ERC-6900 / 7579 — Modular account plugin standards
ERC-6492 — Signature validation for undeployed wallets
RIP-7560 — Native transaction type proposal for protocol-layer AA
📓 Related Topics
📚 Further Reading
🤖 Example Use Cases
Gasless onboarding with verifying Paymasters
Multisig wallets using passkeys and guardian recovery
Games batching actions and sponsoring players
DAOs managing on-chain workflows and access control
✅ Summary
ERC-4337 is the backbone of smart wallet infrastructure on Ethereum. It introduces a new validation-execution flow via EntryPoint and enables bundlers, Paymasters, and flexible signatures—without requiring changes to Ethereum’s base protocol or compromising on decentralization or censorship resistance.
Last updated