Keys, wallets & account abstraction

bundler

A bundler is the actor in ERC-4337 that takes user operations out of the special UserOp mempool, packs a batch of them into a single ordinary Ethereum transaction, and submits that transaction on-chain. It is the bridge between the abstract intent layer and the real protocol: UserOperations are not transactions, so without a bundler to wrap and broadcast them, nothing happens. In role it is much like a block builder, but for the account-abstraction mempool rather than the base layer.

A bundler runs its own node, listens on the alternative mempool, and for each candidate UserOperation simulates the validation step to confirm two things: that the operation is valid, and that it (or its paymaster) will actually reimburse the gas. Only then does it include the operation, calling the EntryPoint's handleOps with the batch; the EntryPoint validates and executes each one and refunds the bundler's gas costs from the accounts and paymasters. The bundler profits from the difference between what it is reimbursed and what the transaction actually costs, plus any priority fee.

To make this safe in an open, permissionless mempool, ERC-4337 imposes validation rules that restrict what a UserOperation may access during its validation phase — for example limiting which storage it can read and banning certain opcodes — so that a bundler's simulation result stays valid by the time the transaction lands and cannot be cheaply invalidated by another operation. This is what prevents denial-of-service griefing where attackers make bundlers waste gas on operations that revert. Today bundlers are a centralization point worth watching; like base-layer block building, the long-term aim is many competing, decentralized bundlers rather than a few dominant ones.

A bundler is not a block proposer. It produces a normal transaction that still has to be picked up by the usual fee market and included by a validator. So a UserOperation passes through two layers of inclusion risk — the bundler choosing it, and the proposer including the bundler's transaction.

Also called
UserOp bundlerERC-4337 bundlerUserOp 打包者