GasStation Express: A simple gas price oracle for anyone running a full Ethereum node

ETH Gas Station
2 min readDec 26, 2017

Ethgasstation.info relies on fairly high overhead monitoring of the Ethereum transaction pool and statistical models to find the best gas price depending on the desired confirmation time. Its not really suitable for the average user to run. Furthermore, statistical models can create a kind of “black magic” that make it hard to trust unless you are willing to invest a lot of time to understand how it works.

The best single predictor of the time it takes for a transaction to be confirmed that I have figured out after a lot of experimentation is the following:

the percentage of recent blocks mined that have accepted at least one transaction with the same or a higher gas price

This is a useful variable since it doesn’t depend directly on things like the distribution of mined gas prices (which are usually much higher than they need to be). Furthermore, when the transaction pool starts getting backed up, the percentages of blocks accepting low gas prices start falling quickly as miners adapt to the demand.

Its not a perfect predictor since it won’t capture sudden changes in the txpool like during an ICO. Furthermore, its not immediately obvious what “percentage of accepting blocks” you should use for your transaction without more empiric analysis.

The thresholds you use to pick a gas price are mainly up to how aggressive you want to be overall with getting low gas prices. Based on my empiric analyses, a gas price for which about 30–40% of recent blocks accept corresponds to an average confirmation time in < 30 minutes (it can be much faster, but sometimes there are other transactions waiting as the same price, and the block may only contain a few of these low priced transactions). When the percentage goes up to 60–70% accepting, confirmation times are usually < 5 minutes. When you really want to make a fast transaction in less than 1 minute, you should use a gas price that almost all blocks accept (e.g. greater than 95%).

Using these relationships, you can make a much simpler script to run that does not require any statistical models (or storing variables in databases) or any analysis of the transaction pool, and it will provide “pretty good” estimates of the right gas prices to use. Its also simple enough for most people running full nodes to use. I have put it on github here: https://github.com/ethgasstation/gasstation-express-oracle.git

There is still a lot of overpaying for gas on Ethereum today. I think users following the gasprices reported from this tool will get much better values based on their desired confirmation times as compared to what is typically being used for most transactions.

--

--