Add `pimlico_getUserOperationGasPrice` endpoint
kristofgazso opened this issue · 0 comments
Currently, most wallets call eth_gasPrice
to get a reasonable value for gas price for their user operations. However, in order for the bundler to be profitable, it needs to bundle User Operations with a gas price that is higher than the gas price of the transaction bundling the ops.
Instead of asking wallets to guess a good gas price to use, it would be better to expose an api that they can use to get a good value for what will be (statistically) acceptable for our bundler, including an overhead that gives the bundler some wiggle room in case gas prices increase.
This API endpoint could return a safeLow, standard, and fast gas prices, likely perhaps ranging from 10-20% on top of the normal gas prices the bundler would typically use (depending on network conditions and the speed chosen by the user: safeLow, standard, or fast).
Useful example from polygon/mumbai: https://wiki.polygon.technology/docs/tools/faucets/polygon-gas-station/
Might be good to standardize this endpoint over time and move it into the eth_
namespace so it's not pimlico specific.