Relayer sets too low of a gasLimit

I have an autotask that occasionally sets too low of a gasLimit, causing the txn to fail due to running out of gas. Example failed transaction

Code snippet:

let tx = await checkpointerContract.connect(signer).checkpointGaugesOfTypesAboveRelativeWeight(typesToCheckpoint, CHECKPOINTING_THRESHOLD, {value: ethers.utils.parseEther(MAX_ETH_TO_BRIDGE)});

As you can see, I'm not manually setting the gas limit. I suppose under the hood an RPC node is queried for an estimated cost and gasLimit is set to (1+alfa) * estimate with alfa = 0.1 or something.


  1. What is the value of alfa?
  2. Can I set the value of alfa?

I know I can do this manually with estimateGas but was hoping a more elegant/native solution might exist?

Hi @markusbkoch

We attempt to set the gas price of a transaction to be about 2.2x the cost of the estimate to ensure it's included within the next minute. Of course, this may still be insufficient with high network activity.

Thanks, that's good to know. But notice I'm referring to gas limit, not gas price :slight_smile: