(Title picture taken from https://www.hdwallpaper.nu)

When is the best time to send Ethereum transactions?

Marco Marchioro
DEXTF Protocol
Published in
8 min readJul 26, 2020

--

An analysis of the hourly periodicity of the Ethereum blockchain shows that the transactions are busiest from the start of the Asian business day through to the end of the Russian one

When I started to use the Ethereum blockchain a few years ago, I was rather happy that I was able to transfer tokens relatively fast compared to the infrequent transactions of Bitcoin. As I became a more sophisticated user, I started to interact with smart contracts and hence I paid more attention to the gas price. Indeed, while sending ETH, or any ERC-20 token, may consume little gas, contract interactions can work out to a hefty sum. In recent months this problem has re-emerged as the rate of utilization of the Ethereum blockchain rose exponentially with new and exciting DeFi projects gobbling up bandwidth which has very clearly inflated gas prices these days.

Recently, while working on the DEXTF project, I had to deploy a number of smart contracts on the Ethereum blockchain and had to practically experience how this task was becoming harder and harder. And this is because:

  1. More and more transactions were sent to the blockchain
  2. Gas prices have risen close to an all-time high

However I also noticed that I could somewhat mitigate these problems by sending the transactions at specific times during the day. Since I did not find much information on the internet on the hourly periodicity of transactions on the Ethereum blockchain, I decided to investigate a bit further by myself.

Obtaining the Ethereum transaction data

The main feature of any public blockchain is in its name: all the data is public. However running an Ethereum node, so that we have access to the whole blockchain in real time, is not an easy task. Fortunately there is a mirror of the Ethereum blockchain accessible as a BigQuery public dataset. Anybody can access these datasets by logging in as a registered user (some restrictions may apply, please read and consult the T&Cs before using it). Once we reach the public-dataset page, we can easily find Ethereum among the blockchains that are available.

Since the gas price used is stored in the transaction itself we can write a query that aggregates transactions by date and hour.

In the next figure I show an example of a query that can be run on the Google Cloud Platform to obtain aggregate transaction dates for each hour since the Ethereum genesis block.

Screenshot of the Google cloud platform web interface for Ethereum public BigQuery dataset
Screenshot of BigQuery results for querying Ethereum transaction by date and hour

Using the BigQuery web interface we can click the Run button, wait for the query job to finish, and save the data either locally (only for a limited number of rows) or on the Google Drive associated to the account.

Note that in this study we use ETH as the main currency and we do not compute the gas price for any other currency.

Ages of the Ethereum blockchain

At this point we assume that we have all the data we need to perform the analysis on the hourly periodicity of transactions. There are many tools that can be used to process the data. My favorite method is to import everything into a Jupyter Notebook and use the Python/Pandas tools to analyze the data. In any data analysis it is always very important to clean the data in the so-called pre-processing phase:

  1. Eliminate the first couple of weeks of data, since at the beginning of the Ethereum blockchain there was a very high gas price and very low number of transactions per second (TPS).
  2. Eliminate the very large outliers in the gas price as they might substantially alter the results of averages.
  3. Round the fields min_block_timestamp and max_block_timestamp to the nearest lower/higher hour
  4. Use the pd.Grouper(freq=’W-MON') to compute the week-average gas price and throughput (i.e. transaction per seconds, or TPS)
  5. Use the python package seaborn to obtain charts that are easier on the eyes than the standard matplotlib charts

I will not bore the reader with the details of the Python code used to process the data. Next, looking at the historical gas price, which it is expressed in Gwei, we notice this variable fluctuates during the blockchain life.

Historical chart of Ethereum gas prices and their week average
Historical gas prices (in GWei) and their week average. Prices are truncated to 200 GWei for visualization

In this charts we notice at least four different “ages”:

  1. A first period in 2015 where gas prices were consistently higher than 50 Gwei
  2. A second period, roughly in years 2016 and 2017, where the gas price rarely exceeded 50 Gwei
  3. A third period, beginning roughly at the end of 2017, where gas prices had a higher volatility but stayed below 75 Gwei
  4. The last period, starting sometime in 2020, with gas prices often being above 50 Gwei

We can compare the historical gas prices with the corresponding TPS, obtained from the hourly data.

Historical throughput, i.e. transactions per seconds, observed for each hour and its week average
Historical throughput, i.e. transactions per seconds, observed for each hour and its week average

Looking at the chart for the historical throughput we can roughly see four ages that do not exactly match the periods that we observed for the gas prices:

  1. A first period of adoption, from the beginning of the blockchain to the end of 2016
  2. A period of exponential growth of throughput, ending at the start of 2018. This period coincided with the ICO mania.
  3. A period of stabilisation, roughly coinciding with the years 2018 and 2019
  4. A new period of growth roughly starting with 2020

Early hourly periodicity of throughput

As seen in the previous charts both variables, the gas prices and the throughput (TPS), vary widely in different periods of their history. Hence it is not appropriate to compare directly the variables at different times. In order to be able to carry out the comparison we need to make the variable time series quasi stationary, following these steps:

  1. We split the whole transaction history into weeks, starting from Monday
  2. We take the week average for each variable
  3. For each variable, we compute the percentage increase, namely the surplus, with respect to the week average

When computing the variable increase, we choose to use the week average rather than the day average so that at a later stage we can also look at the effects of the weekday periodicity (the weekday-periodicity results will be published in a future post).

We first look at the chart for the hourly average of the throughput variable:

Chart of the hourly throughput, measured in transaction per seconds (TPS), using the whole blockchain history
Hourly throughput, measured in transaction per seconds (TPS), using the whole blockchain history

Note that the hours are always measured using the Coordinated Universal Time , or shortened as UTC. At first sight, the above chart doesn’t seem to show any daily periodicity and this contradicts our experience that some hours are better than others. Also, we note that there are four relative maxima at 2 am, 9 am, 2 pm, and 9 pm. This seems to be too much of a coincidence.

It looks like somebody has been using the blockchain specifically at these four hours during the day.

To further our understanding of the the data, we proceed to split the weeks by years. Then we plot the hourly excess throughput for the years 2015 and 2016:

Chart of the hourly throughput, measured in transaction per seconds (TPS), for the years 2015 and 2016
Hourly throughput, measured in transaction per seconds (TPS), for the years 2015 and 2016

It turns out that in the year 2015 transactions were concentrated at 9 am and 9pm, while in the year 2016 transactions were mostly completed at 2 am, 9 am, 2 pm, and 9 pm.

This means that we should not use the earlier years of the Ethereum blockchain to compute the hourly averages.

I am sure that there is a good explanation for the reason why, in Ethereum’s first few years, transactions were concentrated in specific hours. (Contact me, please, if you know the reason as I could not find it on the internet.)

Recent hourly periodicity of throughput and gas prices

Since the early years seem to have peculiarities, I have decided to discard the data before 2018 in order to have a clean view of the hourly periodicity of the two variables under observation: the gas price and the throughput.

Therefore, let’s look at the charts for our variables for each of the last three years. For the throughput, measured in transactions per seconds, we have:

Chart of the average throughput increase/decrease for each hour (UTC) separately for the year 2018, 2019, and 2020
Average throughput increase/decrease for each hour (UTC) separately for the year 2018, 2019, and 2020

While for the gas price we have

Chart of the average throughput increase/decrease for each hour (UTC) separately for the year 2018, 2019, and 2020
Average gas-price increase/decrease for each hour (UTC) separately for the year 2018, 2019, and 2020

Both charts have very similar features. Starting from the year 2018 we seem to have been developing a growing dependence of the gas price and the throughput from the time of the day. In the year 2018 the relative increase/decrease, does not jump often above an absolute value of 10%. In the following years, for the gas price we had a more accentuated increase in the hourly periodicity, while for the throughput this periodicity was higher in 2019 than it is in 2020.

It is also interesting to compare the hourly dependence for both variables on the same chart:

Chart of the verage hourly increase/decrease for each hour (UTC) for the gas price and the throughput
Average hourly increase/decrease for each hour (UTC) for both variables, the gas price and the throughput, together for all recent dates (2018 and after)

This chart clearly shows that both observed variables have a very similar periodicity during a single day. We note that the increase in the gas price and the throughput start both at around 2 am UTC and end around 4 pm UTC.

Interestingly this more or less coincides with the start of the Asian business day and ends approximately with the end of the Russian business day.

Therefore looking at this chart one is tempted to say that the transactions on the Ethereum blockchain are preponderantly submitted during the Asian and Russian daytime.

Conclusion

In conclusion we found the answer to our original question: when is the best time to send Ethereum transactions?

The best time to send a transaction in order to minimise the gas price and to increase its chance of being picked up, i.e. in periods of low throughput, is between 8 pm and 11 pm UTC.

Note that one important variable, which for the purpose of this study was not considered, is the weekday periodicity, i.e. how the choice of the day during the week is also a very important variable to consider.

The results that includes this type of periodicity will be published in a separate study.

--

--

Marco Marchioro
DEXTF Protocol

Ph.D., Crypto quant, Blockchain, Algo Trading, Algorand, QuantLib founder