Bundler Explained in Detail
A bundler is an off-chain participant in ERC-4337. It accepts UserOperations, simulates validation, chooses which ones to include, and submits a transaction to the EntryPoint contract.
Bundlers are not the account owner. They are infrastructure that turns valid smart account requests into on-chain execution.
Smart contract example
entryPoint.handleOps(userOps, bundlerBeneficiary);
The bundler pays for the transaction first and is reimbursed by the account or paymaster if the operation is valid.
Bundler in Auditing
Bundler behavior matters because validation is simulated before inclusion. Code that passes only under one bundler setup, depends on unstable state, or can waste bundler gas is risky.
Auditors look for assumptions about timing, ordering, simulation, and reimbursement.
Red flags in code
-
Validation depends on state that can change between simulation and inclusion.
-
Operations only pass on a specific bundler implementation.
-
preVerificationGasor other gas fields are unrealistic. -
Factories or paymasters can grief bundlers.
-
Protocol logic assumes immediate inclusion after simulation.
How to test or review it
-
Simulate validation, then change relevant state before execution.
-
Test duplicate operations from the same sender.
-
Check replacement and nonce behavior.
-
Run operations against more than one bundler client if possible.
-
Review gas griefing around validation and paymaster logic.
Keep learning this topic
ERC-4337
ERC-4337 is an Ethereum account abstraction standard that uses UserOperations, bundlers, paymasters, and an EntryPoint contract without changing Ethereum consensus.
UserOperation
A UserOperation is the ERC-4337 data structure that describes a smart account action, including sender, nonce, calldata, gas fields, optional paymaster data, and signature.
EntryPoint Contract
The EntryPoint contract is the ERC-4337 contract that validates and executes bundles of UserOperations and manages account and paymaster deposits.
Practice this in real audit scenarios
Definitions help, but auditors need reps. SCH turns concepts like Bundler into exploit labs, code review habits, and report-writing practice.
Start the free trial or see the full smart contract auditing course.