Sends a user operation to the given EVM network.
Network Support
Chain | Mainnet | Testnet |
---|---|---|
Ethereum | ![]() | ![]() |
Polygon | ![]() | ![]() |
Arbitrum | ![]() | ![]() |
Optimism | ![]() | ![]() |
Base | ![]() | ![]() |
Replacement Underpriced Error
You might get a "Replacement Underpriced Error"
when using eth_sendUserOperation
. This error occurs when a user already has an existing operation in the mempool. User operations can become "stuck" in the mempool if their gas fee limits are too low to be included in a bundle.
To resolve this, the user must increase both maxFeePerGas
and maxPriorityFeePerGas
by at least 10%.
maxFeePerGas vs. maxPriorityFeePerGas
The
maxFeePerGas
is the sum of thebaseFeePerGas
andmaxPriorityFeePerGas
. Learn the differences between maxFeePerGas vs. maxPriorityFeePerGas in our comparative article.
How to Resolve a Replacement Underpriced Error
-
Re-estimate gas fees: Re-estimate the gas fees required for your operation. This can be done in various ways which are mentioned below:
eth_maxPriorityFeePerGas
:maxPriorityFeePerGas
can be obtained using this method.getFeeData
: This method on Alchemy SDK returns both the currentmaxPriorityFeePerGas
andmaxFeePerGas
. This method is also available on web3 libraries likeethers.js
and can be accessed through the provider asprovider.getFeeData()
.
-
Choose the suitable increase values: Once you have the re-estimated gas fees, choose the maximum of a 10% increase or the re-estimated values. This ensures that your new gas fee is competitively priced to be included in a block.
-
Account for Rundler's service tip: Rundler requires a small tip for its services via
maxPriorityFeePerGas
. Detailed information about this can be found on the Bundler API Fee Logic page but in summary:-
On Ethereum, Polygon, and Optimism mainnets, the tip should be at least 25% higher than the estimated priority fee on the network.
-
On Arbitrum / Optimism mainnet, the tip is set to a minimum 5% of the estimated network base fee when the bundle is mined.
-
No tip is required on testnets.
-
Now, send your userOperation
again using the calculated values and it should go through successfully.