Boosted Paymaster
The Boosted paymaster is an offchain paymaster that offers faster execution times and cheaper gas fees due to requiring fewer RPC calls and requiring no paymaster data.
How does Boosted user operations work?
Boosted user operations are sponsored user operations without paymaster data. This allows you to save on extra RPC calls and optimize the latency.
These are the RPC calls that are skipped:
pimlico_getUserOperationGasPrice
- we set the gas price to zero, read below for why.pm_getPaymasterStubData
- since we don't have paymaster data, we don't need to call this.pm_getPaymasterData
- since we don't have paymaster data, we don't need to call this.
optional:
eth_estimateUserOperationGas
- If yourcallData
is predictable, you can hard code the gas limits and skip this call as well.
When you set maxFeePerGas
and maxPriorityFeePerGas
to zero, no balance is deducted from user operation's sender on chain. While we charge you off-chain at the end of the month when your bill gets generated. The charge is based on how much fees the bundler has to pay to include the user operation plus the paymaster surcharge for that user operation.
How to send a Boosted User Operation
To send a Boosted User Operation, you only need to:
- Set
maxFeePerGas
andmaxPriorityFeePerGas
to zero - Remove the
paymaster
andpaymasterData
fields
You won't need to make any changes to your application logic as the Boosted User Operation is sent using the standard eth_sendUserOperation endpoint.
In the background, Pimlico will calculate the User Operation cost offchain based on the User Operation's gasUsed
and the bundler's gasPrice
.
Code Example
import { createSmartAccountClient } from "permissionless"
import { toSimpleSmartAccount } from "permissionless/accounts"
import { http, createPublicClient, zeroAddress } from "viem"
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"
import { sepolia } from "viem/chains"
const apiKey = "YOUR_PIMLICO_API_KEY"
const pimlicoUrl = `https://api.pimlico.io/v2/${chain.id}/rpc?apikey=${apiKey}`
const publicClient = createPublicClient({
chain: sepolia,
transport: http()
})
const account = await toSimpleSmartAccount({
owner: privateKeyToAccount(generatePrivateKey()),
client: publicClient
})
const pimlicoClient = createPimlicoClient({
chain: sepolia,
transport: http(pimlicoUrl),
entryPoint
})
const smartAccount = createSmartAccountClient({
bundlerTransport: http(pimlicoUrl),
paymaster: pimlicoClient,
account,
chain: sepolia,
userOperation: {
estimateFeesPerGas: async () => {
return {
maxFeePerGas: 0n,
maxPriorityFeePerGas: 0n
}
}
}
})
// Send a mock transaction
const tx = await smartAccount.sendTransaction({
to: zeroAddress,
value: 0n
})
console.log(`Transaction included: https://sepolia.etherscan.io/tx/${tx}`)
Further optimizations
For maximum performance, hardcode your gas limits if you know your User Operation's gas usage. This eliminates the gas estimation RPC call, reducing your entire transaction to a single eth_sendUserOperation
request.
...
// Send a mock transaction with hardcoded gasLimits
const tx = await smartAccount.sendTransaction({
to: zeroAddress,
value: 0n,
callGasLimit: 250_000n,
verificationGasLimit: 250_000n,
preVerificationGas: 0n
})
Benchmarks
Chain | % faster | Avg. ms saved | Standard latency (ms) | Boosted latency (ms) |
---|---|---|---|---|
OP Mainnet | 42.27% | 2,524.22 ms | 5,971.89 ms | 3,447.67 ms |
Base Sepolia | 43.15% | 3,216.54 ms | 7,454.20 ms | 4,237.65 ms |
Base | 39.23% | 2,662.73 ms | 6,786.65 ms | 4,123.93 ms |
Arbitrum One | 33.93% | 2,799.35 ms | 8,250.12 ms | 5,450.78 ms |
Arbitrum Sepolia | 41.88% | 3,881.81 ms | 9,267.81 ms | 5,386.01 ms |
Sepolia | 34.74% | 5,396.30 ms | 15,535.38 ms | 10,139.09 ms |
Benchmarks were collected by sending 100 simple ETH-transfer user operations per chain and comparing end-to-end latency between a standard sponsored flow and the Boosted flow. Real-world performance will vary depending on network conditions and callData complexity.