ETHGasStation 2.0 — Network Awareness

ETH Gas Station
3 min readJul 11, 2017

--

When you send an Ethereum transaction, there are at least 3 types of factors that will influence how long it takes to be mined:

  1. User-defined Transaction Variables: Mainly ‘gas price’ and ‘gas offered’. Higher gas price will make it confirm faster (up to a point) and providing more gas than needed will make it confirm slower.
  2. Network Demand Variables: No surprise — when you send a transaction the block after a major ICO has started, its going to take longer to confirm.
  3. Black Box Variables: These are variables that an average user running a full node can’t monitor. These include whether your transaction has propagated to the miner node’s transaction pool and what algorithm the miner is using to make blocks, and other chance factors.

When I first launched ETHGasStation- I built it to analyze the impact of the first group of variables (gas price and gas offered/used) on confirmation times. This provided useful information when the network conditions were stable over a long period of time but was completely inadequate during times of sudden shifts in network demand (which is exactly when users are most interested in gas prices and confirmation times). It was a problem of looking backwards to describe what had happened, but what people really cared about was what would happen to the transaction they were sending now.

Today, I am happy to launch what I believe will be a major improvement in forecasting ETH confirmation times and recommended gas prices in the face of fluctuating network demand.

The advance consisted of the following: I was finally able to figure out how to snapshot my node’s transaction pool at the time of incoming transactions. Using this data, I could define a set of baseline covariates for each transaction received by my node (at the time of current model, the database consisted of 600,000 transactions collected at times of both heavy and average network demand). These covariates included the amount of gas in the transaction pool (normalized to the gas limit) priced at or above the submitted transaction’s gas price as well as the total number of transactions in the transaction pool as well as the submitted transaction’s gas price and gas offered. I then used this database to fit a poisson regression model accounting for both user-defined transaction variables and network demand variables.

For people interested in the final regression model, I have posted it here. (Regarding gas offered by the transaction, it turns out that once you offer more than 21000 gas, it will delay your transaction by several blocks on average but it the effect stays fairly constant whether it is 100,000 gas offered or 1,000,000 gas offered- main lesson is do not offer more than 21000 gas if you are sending a standard account transfer)

By monitoring the current transaction pool on an ongoing basis (which changes very rapidly with network demand and can be seen live here), this model can then be used to predict confirmation times based on current network conditions and user defined variables (gas price and gas offered).

Whereas before, the site could only try to describe the recent past, the current model allows for adaptive gas price recommendations to provide gas prices that will get confirmation within a specific time interval depending on current conditions. Furthermore, it should provide users with more confidence to know how long they should expect to wait for a transaction to confirm and let’s them pay for faster times if it is worth it to them.

The model is still by no means perfect. There is still a lot of impact from the black box variables as well as other likely problems from model mis-specification, and I will try to improve it in coming weeks.

It will still not tell you what gas price to use on the exact block a major ICO launches, but it should alert users very quickly to changes in confirmation times to be expected during period of high network demand as well as provide updated gas price recommendations to get a confirmation if you need to send a transaction during one of these periods.

So, while this is still experimental, I hope this new information will help users and wallet providers participate more effectively in the ETH gas market and improve the ETH user experience overall .

--

--