The " difficulty bomb " is an unexpected increase in mining difficulty to discourage miners from staying with the proof-of-work mechanism after it transitioned to proof-of-stake. Ethereum deployed a " difficulty bomb " at block 15530314 on Sept. 14, 2022, the day before “The Merge” went live.
This mechanism increases the difficulty exponentially over time and eventually leads to what is referred to as the “Ice Age”. The chain becomes so difficult to mine that it grinds to a halt and stops producing blocks (freezes).
The difficulty bomb was originally added to Ethereum in 2015 to pressure the community to grow or die. This approach encourages the network to transition to Ethereum 2.0 and staking faster or face the consequences of slower block times.
“Difficulty” and “Difficulty Adjustment Algorithm” in Blockchain plays a crucial part in the performance and scalability of any Blockchain Network.
Block is the key element of any Blockchain Network. A block is a group of transactions with a hash of the previous block in the chain. The hash creates the interlink between each block and keeps those blocks connected.
Figure 1: Anatomy of a block
Block time defines the time it takes to mine a block. Mining is a process to validate the transaction and adding to the distributed ledger. The Network Difficulty measures how difficult it is to mine a block.
A high difficulty means it will consume more computing power to mine the same number of blocks, making the network more secure against attacks. The level of difficulty depends on three factors:
- It varies with the time
- It tries to evaluate the speed of the mining network
- It finds out how much it deviates from the expected level.
Both in bitcoin and Ethereum, there is an expected block time and an average block time. In bitcoin, the expected block time is 10 minutes, while in Ethereum, it is between 10 to 20 seconds. The block time is adjusted based on the level of difficulty.
The difficulty adjustment is directly related to the total mining power estimated in the {hashrate} chart. The difficulty is adjusted every 2016 blocks approximately every two weeks so that the average time between each block remains 10 minutes for Bitcoin.
The difficulty is calculated in the following way:
new_difficulty = old_difficulty X (2016 blocks X 10 minutes) / (the time took in minutes to mine the last 2016 blocks)
Network difficulty is a value. It shows how often miners should calculate a hash function to find a cryptocurrency block on average. The difficulty is measured in hashes (usually terahashes – TH) concerning mining; it signifies the unit of work performed. The network hash rate or net hash (number of miners) is measured by hashes per second (TH/s).
Figure 2: Ethereum Network Difficulty Chart
The scale used for measuring Difficulty:
1 K = 1 000
1 M = 1 000 K = 1 000 000
1 G = 1 000 M = 1 000 000 K = 1 000 000 000
1 T = 1 000 G = 1 000 000 M = 1 000 000 000 K = 1 000 000 000 000
K=KILO G=MEGA G=GIGA T=TERA
Every cryptocurrency has the preset average block find time managed by a network. If the number of miners increases, the network hashrate goes up. The effective block time becomes lower than the preset value. As a result, the network gradually increases its difficulty, that is, the difficulty of a problem that miners are solving. The network will keep increasing until the block find time reaches the preset value.
When the number of miners decreases, the network hashrate( nethash ) goes down. Miners need more time to find a block. So the network lowers its difficulty, thus making a problem easier to solve.
The network itself adjusts difficulty in such a way that the difficulty/nethash = block time
The Difficulty Adjustment Algorithm parses the timestamps applied to a specific interval of blocks to assess whether the same amount of network hash power as was deployed in the interval remains. The difficulty target must be raised or lowered to keep an average block production rate of 10 minutes.
block_time=current_block_timestamp — parent_block_timestamp
current_block_difficulty =
parent_block_difficulty + (parent_block_difficulty // 2048) * max(1 — (block_time// 10), -99) + int(2^((current_block_number // 100000) — 2))
where
// ==> Integer division
2^ ==> 2 to the power
block_time ==> determine how much the block time deviates from the expected block time ( 10 to 19 seconds for Ethereum)
parent_block_difficulty ==> block_time * nethash
int(2^((current_block_number // 100000) — 2)) known as difficulty bomb
Conclusion
The Difficulty Bomb was originally placed as a deterrent for miners who wish to continue mining the Ethereum 1.0 (Proof of Work) chain once the network moved fully to the Ethereum 2.0 (Proof of Stake) chain. It is still a debatable topic that is Difficulty Bomb was a necessity or not after the deployment of Ethereum 2.0. However, it has been observed that for the Difficulty Bomb, the core developers of Ethereum 1.0 are “forced” to upgrade the network via a hard fork.
Reference
[1] Vitalik Buterin, “EIP-100: Change difficulty adjustment to target mean block time including uncles,” Ethereum Improvement Proposals , no. 100, April 2016. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-100
[2] https://www.blockchain.com/explorer/
[3] Ethereum Network Difficulty Chart | Etherscan
[4] Tomasz Kajetan Stanczak, Eric Marti Haynes, Josh Klopfenstein, Abhimanyu Nag, “EIP-5133: Delaying Difficulty Bomb to mid-September 2022,” Ethereum Improvement Proposals , no. 5133, June 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5133.