thankful icon indicating copy to clipboard operation
thankful copied to clipboard

Use a low gas price

Open ErikBjare opened this issue 6 years ago • 4 comments

Gas price estimator: https://ethgasstation.info/

How to set gas price for a transaction: https://ethereum.stackexchange.com/questions/41408/how-can-i-set-the-gas-price-while-deploying-a-contract-with-web3-js

A low gas price of 1 Gwei/gas would cost $0.009 on the main net and be confirmed quickly enough. 1 cent transaction fees ftw :tada:

ErikBjare avatar Jun 27 '18 12:06 ErikBjare

We should probably call https://web3js.readthedocs.io/en/1.0/web3-eth.html#getgasprice and halve it (or divide by something else) instead of guessing the price.

Powersource avatar Jun 27 '18 12:06 Powersource

That returns the median, which will always be pretty high for our use case (currently 8 for the last 1,500 blocks)

Edit: A better way to get a low gas price would be to check the SafeLow price from https://ethgasstation.info/json/ethgasAPI.json

ErikBjare avatar Jun 27 '18 13:06 ErikBjare

I meant we would use some fraction of the median, to guard against price spikes. But safelow looks great!

Powersource avatar Jun 27 '18 14:06 Powersource

Trying out Augur and noticed this: image

"Retry with a higher has price" is always an option in case the network doesn't offer cheap transactions at the time. Another case (imo) for just leaving a low price.

Another argument, https://ethgasstation.info/ also notes:

Note: Estimates not valid when multiple transactions are batched from the same address or for transactions sent to addresses with many (e.g. > 100) pending transactions

In which case transactions could presumably be cheaper.

ErikBjare avatar Jul 10 '18 13:07 ErikBjare