Seasonality in Bitcoin Hashrate and Average Rainfall in Sichuan, China
[ Originally published April 26, 2021]
Originally, this project was going to test correlation between bitcoin’s price and it’s hashrate. As I dug into it, it seemed more and more like a useless enterprise and I kind of lost interest. However, in gathering the data, I read about a large drop-off (45%) in hashrate earlier this month (4/15/21). Looking into it further, most sources attributed this drop to blackouts in Xinjiang, China where a lot of mining operations are conducted (see Bitcoin mining map of China below). It was a strong indication of China’s dominance in the Bitcoin mining, and further Googling found that sources attribute 60% of the global hashrate to China. This led me down another rabbit hole — geographic distribution (or rather concentration) of bitcoin mining in China, and got me wondering about the potential effects this might have on the total hashrate.
A few articles I read touched on yearly miner migrations within China — moving seasonally to areas where the rates of electricity are under-utilized and over-supplied. One of the biggest, if not the biggest driver of these migrations is hydro-electricity during the rainy season (Jun-Sep), mainly in the Sichuan and Northern Yunnan provinces. Dams like Xiluodu (3rd largest power station in the world) produce tons of cheap electricity for the region. What seems to happen is that many mining farms relocate to these areas during the rainy season, and transition back to areas with thermal power facilities (coal) like Inner Mongolia and Xinjiang in the dry season. Rates for electricity during the wet season can be twice as cheap as those in thermal power.
Bitcoin Mining Map — Univ. of Cambridge
I decided to test some of these numbers for myself — just to see if there was a recognizable pattern. For all you traders out there, I would have loved to have tied this to price action but the geeky side of me got a little carried away and this is mostly an academic endeavor. But hey, if you see some profitable insight here share the love and let a brother know! I plot hashrate vs. price at the end of this article if you are interested.
Here is a de-trended (more on that in a bit) box-and-whisker plot of average monthly hashrate for the last 3 years:
Hashrate Trends 2018–2020
You can see a yearly increase in hashrate starting around May/June and dropping off again around October, coinciding with average rainfall in Sichuan:
Average Rainfall in Sichuan (Chengdu)
In order to get this data and visualize any cyclical patterns, I had to correct for a large uptrend — a meteoric rise in hashrate over the last 5–6 years due to the recent popularity of crypto, the scaling of commercial mining operations, and better hardware i.e. higher hashrate, better energy efficiency (see hashrate graph below). If this correction wasn’t made, all we’d see is a large increase in hashrate — and you wouldn’t need this article to tell you that.
I started by running a series decomposition using Python’s statsmodel library. It’s used as a general indicator for trends/seasonality by calculating a trend line and seasonal patterns, but should be used as a weak indicator and taken with a grain of salt. I used to it make sure I was headed in the right general direction and to reference later. Since I was looking for a seasonal trend I aggregated average hashrate per month to see what, if any, seasonal patterns were present. Plotting out this decomposition gives you the following:
Each ghetto snipping tool markup indicates a year
With this weak confirmation of seasonality present, I took it further by deconstructing my own means of trend correction with the intent to plot each year’s monthly distribution of daily hashrate and see if the different years resembled each other. I used the NumPy .polyfit() module to do a polynomial regression on average daily hashrates from 2015–2021 (to represent the “trend”), and then used the difference between the actual hashrate (observed) and the trendline (prediction) to create another dataset. What you see in the boxplots above are the distributions of these differences by month and year.
In plain English, I was asking “how much over or under was the actual observed hashrate compared to the hashrate predicted by the general uptrend?”. The boxplots show that in the rainy months, the actual hashrate generally sits above the trend.
Here is the actual hashrates, in green, plotted against the trendline, in blue:
Observed vs. Predicted Average Daily Hashrate
Teasing out seasonality any earlier than 2017 was difficult to do as the average hashrates are comparatively so much smaller early years than in later years, that the regression line being used to represent the “trend” is a lot less representative in those earlier years. You can see in the plot above, that prior to 2017/2018 the trend line doesn’t fit the data as well in a relative sense (‘relative’ being the key word here).
If I scrunch the timeline and the regression down to 3 years and run the regression then, it follows the trend a bit better but still doesn’t give us anything too significant in terms of seasonality. You can see them below. A little better, but I think still skewed by external macro trends. Keep in mind that bitcoin mining is still in relative infancy — the ASIC was introduced 2013 and 2014–2016 marked the rise of China’s dominance in mining with pools like Bitmain and Antpool.
I imagine it takes a bit of time to learn and refine your operations so that large consolidated efforts like mining farm migration might not have been as prevalent in those earlier years. The data may also have been skewed by early regulatory disruptions like China shutting down exchanges in 2017.
2017
2016
2015
In conclusion (yay!), we can see that there is a disproportionate concentration of mining operations in China mainly due to an abundance of low-cost energy (sometimes subsidized), and in my humble opinion — a larger supply of low-cost, tech-savvy labor willing to live in the middle of butt-fuck nowhere to maintain mining farms (Read: Lower Quality-of-Life). I know the crypto-world loathes the word “centralization” — generally following libertarian principles of self-sovereignty and free-market yadda-yadda-beep-boop. So on the surface this concentration seems like a bad or maybe even a dangerous thing, but the reality is that these miners account for a large portion of bitcoin’s network security — and if they engaged in malicious behavior and the price of bitcoin tanked, they’d be hurting just as much as the next guy. It’s in their interest to maintain network health and ensure enough liquidity for them to cash-in their efforts. So I think there’s some general incentive-alignment there to put your mind at ease.
Like it or not, bitcoin mining in China is important to the crypto ecosystem as a whole, in the same way AWS is important to the internet ecosystem. For that reason, I think it’s wise to continue to pay close attention to the dynamics of mining in China. For example, due recent efforts to meet climate change targets and push the carbon-neutral narrative, China is reportedly shutting down crypto-mining operations in Inner Mongolia, along with other energy-intensive industries.
How does this affect the distribution and competitiveness of China’s bitcoin mining? What does it speak to more general questions — e.g. as Bitcoin’s network value grows, how will we maintain the economic value of POW network security when it is directly tied to energy consumption — and can energy consumption scale in the same fashion? Currently the energy consumption of Bitcoin is comparable the total energy consumption of Kazakhstan, with a carbon footprint comparable to that of the country of Hungary. And that’s just Bitcoin. If the price and hashrate trend continues, we’re likely looking at more. So as we ask these questions, we should continue to keep a close eye on China’s energy policy stances and the general landscape of bitcoin miners and their migrations in the region.
For the traders, as promised. Price in green: