What is Bitcoin mining difficulty: How is it calculated?

What is Bitcoin mining difficulty: How is it calculated?

Bitcoin difficulty is a measure of how hard it is to mine a block on the Bitcoin blockchain. It is a custom scoring system with values ​​ranging from 1 to (theoretically) infinity (e.g. Bitcoin started with a difficulty of 1, but at the time of writing, it has a difficulty of 27.55 trillion).

More specifically, Bitcoin's difficulty measures how hard it is for miners to calculate a valid hash value that is below the 256-bit target number set by the Bitcoin network. When the hash value is equal to or below this target number, miners can successfully find and unlock a new block. Therefore, the lower the target value, the higher the mining difficulty.

Bitcoin's difficulty adjustment ensures that the Bitcoin network develops steadily according to the pre-set coin issuance plan. The Bitcoin network automatically adjusts its difficulty level after every 2016 blocks, with a time frame of approximately 2 weeks, which miners call a difficulty period. As a difficulty period ends, another new difficulty period will restart after the difficulty adjustment, in order to ensure that the time for miners to mine new blocks is as close to the average of 10 minutes as possible.

When miners find that the block mining time is lower than the target average of 10 minutes during a difficulty period, the Bitcoin network will increase the difficulty (the algorithm target value will decrease); if the mining time exceeds 10 minutes, the network difficulty will decrease accordingly (the algorithm target value will increase).

As shown below, Bitcoin’s difficulty is an important component of Bitcoin that confirms the consistency between Bitcoin’s supply issuance and block confirmation intervals.

Figure 1: Relationship between the total issuance of Bitcoin and the inflation rate under the halving mechanism

Bitcoin Difficulty Calculation

Bitcoin miners can easily and independently determine the current mining difficulty using a Bitcoin node. The difficulty formula is as follows:

Difficulty level = difficulty target value / current difficulty value

Difficulty target value: Bitcoin's maximum difficulty target value (that is, the difficulty target when Bitcoin was first launched, when the difficulty value was 1)

Current target value: A 256-bit value determined by the Bitcoin network.

At the beginning of each difficulty period, the Bitcoin network recalculates the current target hashrate by summing up the total number of minutes miners have spent mining the last 2,016 blocks, dividing that number by the protocol's expected target of 20,160 minutes (2,016 blocks x 10 minutes), and then multiplying that ratio by the current difficulty level to produce a new difficulty level.

It is also worth mentioning that in order to prevent drastic changes in network difficulty, the Bitcoin network can only adjust the difficulty to a multiple of 4. In other words, whenever a difficulty adjustment occurs, the Bitcoin network difficulty value can increase by a maximum of 300% or decrease by a maximum of 75%.

How does Bitcoin mining difficulty affect hashrate price and mining revenue?

The price of Bitcoin and mining difficulty will affect the price of hashrate (profitability of Bitcoin mining) in the short term, while the impact of the block subsidy halving on the price of hashrate is long-term. In most cases, the price of Bitcoin and mining difficulty are the main factors affecting the price of hashrate.

The hashrate price is negatively correlated with mining difficulty. An increase in Bitcoin difficulty will reduce the hashrate price, while a decrease in Bitcoin difficulty will increase the hashrate price because miners need less work to find blocks in a low difficulty period.

This correlation is always true for the price of hashrate denominated in Bitcoin (as shown below), but is less pronounced for the price of hashrate denominated in USD, as the latter is directly affected by Bitcoin difficulty and Bitcoin price.

Figure 2: Correlation between Bitcoin network difficulty and hashrate price (in Bitcoin terms)


<<:  About the Crypto Industry: What the World’s Most Influential CEOs Say

>>:  Cryptocurrency scams are rampant: How you can protect your assets

Recommend

Which Crypto Figures Could Go to Jail in 2024?

While no one can be sure how the courts will deci...

Is having different ears a sign of high intelligence?

We know that ears are related to fortune. People ...

What are Danfeng eyes? Danfeng eyes pictures

Danfengyan is a type of phoenix eye, and strictly...

High school dropout invests in Bitcoin and becomes millionaire at 18

According to CNBC on the morning of the 21st Beij...

What type of love you are based on your facial features

What type of love you are based on your facial fe...

A person's face determines his fate

It is said that everything is determined by fate ...

The face of a wealthy and long-lived person

The face of a wealthy and long-lived person A per...

Illustration of Fuxi's bone face

Fuxi bone, also known as square fuxi bone, is oft...

What does it mean if there is no wisdom line?

The wisdom line is one of the main lines on the p...

Digital asset thefts are common. How to ensure the safety of your own assets?

Digital asset thefts have occurred frequently, an...