Bitcoin’s proof-of-work consensus mechanism and its relation to energy consumption

Bitcoin’s proof-of-work consensus mechanism and its relation to energy consumption

Co-Author: Stefanie von Jan

Work is energy directed to a certain action and energy is “work done,” as stated by the French Mathematician Gaspard-Gustave de Coriolis. The work done can be stored in money such as bitcoin for future expenses. The Bitcoin consensus mechanism is based on proof of work in which energy is used to keep the blockchain running securely.

In the process of generating new blocks, miners solve a guessing game in which pooled transactions plus a “nonce” are inserted into an SHA-256 hash function in average time frame of 10 minutes until the result matches predetermined criteria defined by the protocol. In more detail, miners retrieve unconfirmed transactions from the mempool and bundle them into a new block. This block has several pieces of information in the block header. The miners then take the block header, add a random number called “nonce” and put it into the hash function resulting in a 256 bit number. Only results smaller than a certain limit are accepted by the network, which is again predetermined by the blockchain protocol and called “target” (e.g. the returned result’s first 32 bits must be zeros [simplified]).

The miners repeatedly insert the conglomerations of transactions bundled as blocks in the hash function until a result matches the criteria. The number of such trials per second is called “hashrate.” The first miner who receives a result that matches the predetermined criteria broadcasts the result to the network and receives the block reward which also includes the transaction fees of the transactions included into the block. This process is called “mining” due to the similar properties of bitcoin and precious metals. Satoshi Nakomoto, the fictitious name of the inventor of Bitcoin, supports this statement in one of his posts.

“In this sense, [Bitcoin is] more typical of a precious metal. Instead of the supply changing to keep the value the same, the supply is predetermined and the value changes.”

— Satoshi Nakamoto

If you want to read more about the mining process in detail, this is a great starting point: How Bitcoin mining really works

The number of bitcoins issued per block is predetermined by the protocol. As a result, the supply of bitcoin is mathematically controlled and finite — in stark contrast to money issued by central banks.

Over time, the amount of new bitcoins issued per block decreases by 50%. This “halvening” occurs every 210,000 blocks, or roughly every 4 years. Currently, 12.5 bitcoins are issued per mined block.

No alt text provided for this image

The Bitcoin proof-of-work mechanism is set up so that the difficulty of finding a new block is adjusted every 2016 blocks and the average time for finding a new block is about 10 minutes. The difficulty is influenced by the hashrate provided by the network (the higher the hashrate, the higher the difficulty).

This means that there is a mining market with a fixed supply of bitcoins, as defined by the protocol, and a variable demand for computing power based on the difficulty determined by the overall hashrate. Due to the law of supply and demand, the predetermined bitcoin reward per block, the current bitcoin price, and the mining costs define the cost-efficient number of miners contributing to securing the network.

In an efficient market, the premium equals zero which means that the marginal return from burning a kWh of energy through proof of work equals the marginal mining costs. This results in the following formula where block reward includes transaction fees:

No alt text provided for this image

The automatic adjustment of Bitcoin’s mining difficulty leads to a dynamic, self-correcting system. Assume the bitcoin price and the block reward remains constant while the mining costs increase. For the above equation to hold, fewer people will mine which eventually lowers the mining difficulty. The same holds for the reverse: Assume the left side of the equation remains constant and the mining costs decrease. More Bitcoin miners will come online which increases difficulty.

In reality, however, perfect equilibrium does not occur since miners do not immediately switch off their equipment when they become unprofitable. Also, the increase in hashrate lags due to manufacturing and delivery time requirements. This leads to arbitrary advantages for existing hashrate owners when the bitcoin price increases.

One can conclude:

  1. The energy consumption for keeping the Bitcoin blockchain running is determined by the hashrate of the network and each miner’s energy consumption.
  2. The bitcoin reward is predetermined by the protocol.
  3. The overall cost-efficient mining power is defined by the market (bitcoin reward per block and bitcoin price).

Ultimately, mining bitcoins should be compared with mining precious metals or with the banking system. The following figure, taken from this article that retrieves information from Hass McCook, 2014 and uses updated Bitcoin mining including investment costs and running costs, shows this comparison. Additionally, a comparison with VISA is included based on the 2017 Visa annual report.

No alt text provided for this image

Most other studies use faulty methodology to calculate the future Bitcoin energy consumption. Extrapolations rely on the energy costs per transaction which is not the correct measure to calculate energy costs since these are solely dependent on the deployed hashrate. The hashrate, in turn, is independent of whether the block is full or not and the network is working at full capacity or not.

Additionally, most studies base calculations on the assumption that no transaction batching exists. (Transaction batching is a collection of several transactions which are then written on the blockchain as one transaction.) Exchanges, for example, collect “off-chain” transactions in a central database which are then collectively written on the blockchain as one settlement transaction. The same holds for the emerging Lightning Network and side chains like Liquid with the additional crucial feature of trustlessness. Thus, Bitcoin irreversibly becomes more of a settlement layer that secures exponentially more and more economic value.

Lastly, calculations are often made with very outdated data on mining power which fails to capture the increased efficiency of bitcoin mining.



Bitcoin’s energy consumption in the future

The future energy consumption depends on the number of miners and each miner’s energy efficiency.

No alt text provided for this image

The energy consumption per hash decreases together with the global trend of increased energy efficiency due to better chip design. A table adapted from Bitcoin Wiki shows the increasing energy efficiency of newer Antminers (a specific Bitcoin mining hardware).

In particular, the Mhash/J (millions of hashes per joule) increase dramatically. This means with a given joule of energy — 1 watt per second — the hashrate increases by more than 20 times from Antminer generation 1 to generation 9. The efficiency in terms of costs also raises dramatically. The same holds for the Bitfury miners as shown in the following tables:

No alt text provided for this image

Another study shows an increase in miner efficiency and reduced costs over time:

No alt text provided for this image

Although miners have become increasingly efficient and cheap, bitcoin mining has become unprofitable for those mining at the worldwide average electricity cost. This is due to the sharp increase in the bitcoin price in late 2017 that led to a high investment in miners which were largely delivered and turned on as prices dropped again in the beginning of 2018. The sharp increase in miners contributing to the network has resulted in an increased difficulty in finding new blocks which, in turn, reduced the expected return.

In 2018, the bitcoin price decreased but the mining hardware was already purchased and mostly running at costs when including the initial investment. Some miners were even destroyed as the basic operational costs exceeded the return (Saifedean, Bitcoin Mining: Energy and Security, 2018, Volume 1, Issue 3). Essentially, only the most competitive mining operators that have access to the cheapest energy could survive. This trend incentivizes the provision of cheap energy, which will be explained in great detail in the following sections.

For the total energy consumption to increase, the hashrate must increase dramatically (surpassing the increased efficiency). As explained in the above section, the following equation holds:

No alt text provided for this image

In this formula the time interval per hashrate doesn’t matter because the costs are calculated accordingly. Assume a hashrate per 10 minutes is used, then the costs per hashrate of 10 minutes is applied. This is the same as taking the costs for the hashrate for 1 second and then having 600 times more hashrates.

Let’s use an example. Assume the cost per hashrate for 10 minutes is 5, then the following holds: 1*5= 600* 5/600, where the right side of the equation is the costs per second (10 minutes are 600 seconds) because the costs per hashrate per second is 5/600.

Solving the equation for the total number of miners gives:

No alt text provided for this image

Holding everything else equal, a decrease in mining costs per miner per block increases the incentive to contribute in mining and therefore increases the total hashrate.

Now let’s look at the numerator: In the future, the amount of newly-minted bitcoins per block goes to zero, thus only the transaction fees serve as a block reward. Taking this factor by itself, a decrease in issued bitcoins per block should dramatically decrease the hashrate. However, in reality this has not been true. At the last reward halving in mid-2016, there was no considerable decline in hashrate, yet profitability decreased dramatically:

No alt text provided for this image

Eventually, a constantly-increasing bitcoin price incentivizes miners to continue to contribute to the mining process and secure the network. Many Bitcoin experts believe that bitcoin is undervalued and therefore expect the bitcoin price to increase dramatically (advanced research on the value of bitcoin: Delphi Digital Report November 2019Bitcoin: A $5.8M Valuation). As a result, the bitcoin price development will influence the total hashrate in the future which will determine the energy consumption. Essentially, the hashrate contributing to the network is defined by the market and the market is unequivocal.

In summary, the hashrate is positively correlated with the bitcoin price because the incentive to mine increases. As a result, energy usage will be more efficient with increased hashrates due to increased competition that forces miners to optimize their power consumption. Finally, the hashrate will not go up indefinitely because bitcoin halving balances the incentive to mine even if the bitcoin price skyrockets in the next decades.

In addition, there are developments that make the Bitcoin blockchain more efficient. The developments include optimizations such as transaction batching and advanced cryptography, as well as additional layers on top of Bitcoin, like exchanges, bitcoin banks, side chains, and the Lightning Network.

The Lightning Network is especially interesting for scaling the amount of bitcoin transactions by reducing the average energy amount needed to secure one transaction of bitcoins. As a decentralized peer-to-peer payment system, using the consensus of the Bitcoin blockchain as a settlement layer to inherit its unique trust properties, the Lightning Network does not rely on an entry in the one commonly-shared ledger called blockchain and could theoretically handle billions of transactions per second.

Transactions performed on centralized second layers (exchanges like Coinbase, etc.) are also not placed on the blockchain and don’t consume the energy directly. In this case trust comes from the entity documenting the bitcoin transactions for its customers and maintaining a closed ledger about who owns how many bitcoins. These developments result in many more (if not unlimited) payments, without the need of placing them on the blockchain. That’s why an increase in bitcoin transactions decreases the average amount of energy needed to secure each individual bitcoin transaction to almost zero.

Conclusion

Everything in our lives is related to energy. Transportation, manufacturing, cooking etc. requires energy. Thus, efficient energy production is essential to our everyday lives. Bitcoin incentivizes efficient energy production and therefore sets the correct incentives for the energy system as a whole.

“[…] bitcoin is providing a powerful market incentive to energy producers worldwide to increase their energy production. […] By giving a large financial incentive to anyone able to mine at an electricity cost below that of the market, Bitcoin makes the development of cheap sources of electricity, anywhere in the world, very rewarding.” Saifedean, Bitcoin Mining: Energy and Security, 2018, Volume 1, Issue 3

要查看或添加评论,请登录

社区洞察

其他会员也浏览了