ERC-4337 UserOp/Bundler/EntryPoint Flow Explained
Wiki route
This entry sits under systems index. Read it against ERC-4337 Overview · Application-Layer Implementation of Account Abstraction for peer / contrast context and fintech index for the broader system / regulatory boundary.
Key facts
- A UserOp is not a transaction; it is a sub-unit packaged by a Bundler
- A Bundler is similar to a block builder, but it operates in the UserOp mempool
- EntryPoint is a singleton contract and the entry point that every UserOp must pass through
- Paymaster is an optional contract that either sponsors gas or accepts gas payment in ERC-20
- Aggregator is optional and batch-verifies multiple signatures(BLS / others)
Mechanism / How it works
End-to-end flow(typical USDC gas-sponsorship scenario):
-
The user builds a UserOp:the user(or dApp) generates a UserOperation object:
sender(SCW address)noncecallData(specific call, e.g., USDC.transfer)callGasLimit/verificationGasLimit/preVerificationGasmaxFeePerGas/maxPriorityFeePerGaspaymasterAndData(when using a Paymaster)signature(signature of the SCW owner)
-
Send the UserOp to the alt-mempool:the user sends it through the Bundler RPC(
eth_sendUserOperation) -
Bundler simulation + packaging:the Bundler forks state locally and executes the UserOp, confirms that the gas estimate is correct, then packages N UserOps into a standard transaction 1 件 and calls EntryPoint.handleOps()
-
EntryPoint executes:
- Calls the SCW factory and deploys the SCW(if the SCW does not yet exist)
- Calls SCW.validateUserOp() to verify the signature + nonce
- Calls Paymaster.validatePaymasterUserOp() to verify the Paymaster’s sponsorship consent
- Executes callData(the main business logic)
- Settles gas:collects from the Paymaster / pays the Bundler
-
On-chain result:the user can confirm the SCW execution result and does not need to hold ETH
Core innovation point:because a UserOp is not a transaction, Bundlers can perform “batch-processing optimization” — packaging 10 件 UserOps into 1 件 transactions and spreading the on-chain base cost.
Origin & evolution
The UserOp structure went through multiple iterations during the 4337 draft period(2021-2022). Early versions had more fields(wallet, separate initCode, etc.), but were later simplified into the current form. The main simplifications from v0.6(2023-03 public version) to v0.7(2026) were:
- Integrating
initCodeinto thesendergeneration logic - Splitting Paymaster fields out of calldata and making them explicit
- Reducing gas overhead by 20-30%
The Bundler economic model introduced a priority-fee auction mechanism after v0.7 , mitigating the early problem that “Bundlers are hard to monetize.”
Related
- Wiki Index
- ERC-4337 Overview
- Embedded Wallet Adoption
- ERC-7702
Sources
- ERC-4337 EIP v0.6 / v0.7 spec
- ERC-4337 (Account Abstraction) — https://eips.ethereum.org/EIPS/eip-4337