Bundler
A bundler is a node that collects ERC-4337 UserOperations and submits them as bundled transactions to the blockchain.
Key Takeaways
- A bundler is a specialized node in the ERC-4337 account abstraction architecture that collects UserOperations from an alternative mempool, validates them through simulation, and submits them as bundled transactions to the blockchain.
- Bundlers front gas costs on behalf of users and get reimbursed through the EntryPoint contract, earning the difference between the gas fees users specify in their UserOperations and the actual execution cost.
- Multiple bundler implementations exist across the ecosystem, including open-source options from providers like Alchemy, Pimlico, and Etherspot, each interacting with the same canonical EntryPoint contract and smart wallet infrastructure.
What Is a Bundler?
A bundler is a node that serves as the bridge between users of smart contract wallets and the blockchain. In the ERC-4337 account abstraction standard, users do not submit regular Ethereum transactions. Instead, they create UserOperations: data structures that describe the actions they want their smart accounts to perform. Bundlers collect these UserOperations, validate them, and package them into a single on-chain transaction that calls the shared EntryPoint contract.
The bundler's role is analogous to a block builder in traditional Ethereum, but it operates at a higher layer. Where block builders assemble transactions into blocks, bundlers assemble UserOperations into bundle transactions. This separation allows account abstraction to work without any changes to the Ethereum consensus layer: the EntryPoint contract and the bundler handle everything at the application level.
The concept was introduced as part of EIP-4337, authored by Vitalik Buterin and others, to enable programmable transaction validation and execution without requiring protocol-level modifications. Bundlers are the operational backbone that makes this possible.
How It Works
The bundler sits between wallet applications and the Ethereum network, managing a parallel infrastructure for UserOperation processing. Here is the lifecycle of a UserOperation from submission to execution:
- A user creates a UserOperation through their smart wallet, specifying the target call data, gas limits, fee parameters, and a signature
- The wallet sends this UserOperation to a bundler via the
eth_sendUserOperationJSON-RPC method (defined in ERC-7769) - The bundler simulates the UserOperation locally to verify it will succeed: checking the signature, confirming the account can pay fees, and ensuring execution won't revert
- Valid UserOperations enter the bundler's alternative mempool, separate from Ethereum's standard transaction mempool
- The bundler selects one or more UserOperations and packages them into a single transaction calling
handleOpson the EntryPoint contract - The EntryPoint contract validates each UserOperation on-chain, executes the requested actions, and reimburses the bundler for gas costs
The EntryPoint Contract
The EntryPoint is a singleton smart contract deployed at the same address across all EVM-compatible chains. It exposes a core function that bundlers call:
function handleOps(
PackedUserOperation[] calldata ops,
address payable beneficiary
);The ops parameter is an array of UserOperations to execute. The beneficiary is the address that receives the gas refund: typically the bundler's own address. The contract processes each operation in two phases: first validating all operations (checking signatures, nonces, and fee coverage), then executing them sequentially. This two-phase approach prevents a failing operation from blocking the validation of others in the bundle.
UserOperation Structure
A UserOperation contains all the information the EntryPoint needs to validate and execute an action on behalf of a smart account. In the v0.7 EntryPoint, fields are packed for gas efficiency:
struct PackedUserOperation {
address sender; // The smart account address
uint256 nonce; // Anti-replay nonce
bytes initCode; // Factory address + data (for new accounts)
bytes callData; // The action to execute
bytes32 accountGasLimits; // Packed verification + call gas limits
uint256 preVerificationGas;
bytes32 gasFees; // Packed maxPriorityFee + maxFeePerGas
bytes paymasterAndData; // Paymaster address + data (optional)
bytes signature; // Account-specific signature
}When a paymaster is specified in the paymasterAndData field, the paymaster contract pays the gas fees instead of the user's smart account. This enables gasless transactions and gas sponsorship patterns.
Simulation and Validation
Before accepting a UserOperation into its mempool, a bundler must simulate it to prevent denial-of-service attacks and wasted gas. The simulation checks:
- The account's
validateUserOpfunction returns a valid result - The account has sufficient funds (or a valid paymaster) to cover gas costs
- The nonce is correct and hasn't been used
- Execution will not revert under current chain state
Only UserOperations that pass simulation are added to the mempool. The bundler returns a userOpHash on success: a hash over the UserOperation fields, the EntryPoint address, and the chain ID. This hash serves as the unique identifier for tracking the operation.
Bundler Economics
Bundlers operate on a gas arbitrage model. Each UserOperation specifies maxFeePerGas and maxPriorityFeePerGas values, similar to EIP-1559 transactions. The bundler pays the actual gas cost of the bundle transaction and receives reimbursement from the EntryPoint contract based on the gas consumed per UserOperation.
The bundler's profit comes from the spread between what users are willing to pay (their specified gas parameters) and the actual cost of including the bundle on-chain. Research from the Ethereum Foundation notes that a basic ERC-4337 operation uses approximately 42,000 gas, roughly double the 21,000 gas of a standard Ethereum transfer, due to the additional validation and contract interaction overhead.
Bundlers can increase efficiency by packing multiple UserOperations into a single bundle transaction. The fixed overhead of the transaction itself (21,000 base gas plus EntryPoint function dispatch) is amortized across all operations in the bundle, improving margins as bundle size grows.
Bundler Implementations
Several bundler implementations exist, each targeting different operational needs. Because all bundlers interact with the same canonical EntryPoint contract, they are interchangeable from the wallet's perspective:
| Bundler | Developer | Language |
|---|---|---|
| Rundler | Alchemy | Rust |
| Alto | Pimlico | TypeScript |
| Skandha | Etherspot | TypeScript |
| Stackup Bundler | Stackup | Go |
| Silius | Community | Rust |
Most production deployments use bundler-as-a-service providers rather than self-hosting. Providers like Alchemy, Pimlico, and Biconomy offer managed bundler infrastructure with additional features like gas estimation, multi-chain support, and reliability guarantees.
Use Cases
Smart Wallet Infrastructure
Bundlers are the operational layer that makes smart wallets work. Every smart wallet built on ERC-4337 depends on bundlers to get UserOperations on-chain. Without bundlers, smart accounts would have no way to initiate transactions since they cannot sign native Ethereum transactions themselves.
Gasless Onboarding
Combined with paymasters, bundlers enable gasless onboarding flows where new users can interact with decentralized applications without holding ETH. The bundler submits the UserOperation, the paymaster covers the gas, and the user never sees a gas fee. This pattern is critical for mainstream adoption of blockchain applications.
Batch Operations
Because bundlers can pack multiple UserOperations into a single transaction, they enable efficient batch processing. Applications can submit many user actions at once: token approvals, swaps, and transfers can be bundled together, reducing per-operation costs through shared overhead.
Transaction Abstraction
Bundlers work alongside smart accounts to enable custom validation logic. A smart account might use passkey authentication, multi-party computation, or session keys for authorization. The bundler doesn't care about the specific validation scheme: it only requires that the account's validateUserOp function succeeds during simulation.
Relationship to MEV
Bundlers have ordering power over the UserOperations they include, creating dynamics similar to maximal extractable value (MEV) in block building. A bundler can choose which UserOperations to include, exclude, or reorder within a bundle. This creates a form of "bundler extractable value" where bundlers could profit by front-running or sandwich-attacking user operations.
The ERC-4337 specification mitigates this partly through its design: the EntryPoint validates all operations before executing any, limiting some forms of manipulation. However, the protocol has no slashing mechanism for misbehaving bundlers. The primary deterrents are reputational: a bundler known for extracting value from users will lose market share to competitors.
For applications processing high-value DEX trades or DeFi operations through smart accounts, bundler selection matters. Some bundlers integrate with services like Flashbots to submit bundles privately, reducing the risk of front-running by other network participants.
Censorship Resistance and Decentralization
A key design goal of ERC-4337 is that bundlers should be as replaceable as possible. Users submit UserOperations to bundlers via standard JSON-RPC calls, and any entity can run a bundler. If one bundler censors a particular user or contract, the user can submit to a different bundler.
In practice, the bundler market has concentrated among a handful of infrastructure providers. This mirrors the centralization pattern seen in Ethereum's block builder market. The ERC-4337 community has proposed a peer-to-peer mempool network where bundlers gossip UserOperations among themselves, similar to how Ethereum nodes propagate transactions. This would reduce dependence on any single bundler provider.
As a fallback, users can always bypass bundlers entirely by submitting a regular Ethereum transaction that calls the EntryPoint contract directly. This requires the user to hold ETH and pay gas themselves, but it ensures that no bundler can permanently block access to a smart account.
Risks and Considerations
Gas Overhead
The additional validation and contract interaction layers mean UserOperations cost more gas than equivalent native transactions. A simple transfer through ERC-4337 uses roughly twice the gas of a standard ETH transfer. For users paying their own gas, this overhead represents a direct cost increase. For applications sponsoring gas through paymasters, it increases operational expenses.
Centralization Risk
Despite the permissionless design, running a production bundler requires significant infrastructure: reliable RPC nodes, simulation environments, gas estimation systems, and multi-chain deployment. This creates barriers to entry that concentrate bundling among well-funded infrastructure providers. If the top bundlers collude or fail simultaneously, smart wallet users could experience degraded service.
Mempool Fragmentation
Without a fully unified peer-to-peer mempool, UserOperations submitted to one bundler may not be visible to others. This fragments the market and reduces competition. The Ethereum Foundation has published specifications for a unified mempool, but adoption requires all bundlers to implement identical validation rules to prevent peers from flooding each other with operations that have inconsistent validity.
Simulation Divergence
A UserOperation that passes simulation may still fail on-chain if chain state changes between simulation and inclusion. The bundler bears this risk: it pays gas for a failed operation without receiving full reimbursement. Sophisticated bundlers mitigate this with just-in-time simulation and by monitoring the mempool for conflicting transactions.
For a deeper look at the account abstraction architecture that bundlers support, see the research article on Ethereum account abstraction and ERC-4337. To understand how bundlers interact with gas sponsorship, see the paymaster glossary entry.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.