Ergo Platform | “Revisiting Difficulty Control for Blockchain Systems”

Since its inception, Bitcoin mining has gone from being a “garage project” to a competitive industrialized practice. According to the “Global Cryptocurrency Benchmarking Study”, a research paper recently published by the Cambridge Centre for Alternative Finance (CCAF), electricity consumption for Bitcoin mining facilities can be estimated at around 462MW. 

In this competitive environment, miners are expected to take every advantage they can get their hands on. This can range from ways to cut power costs, acquiring faster hash rate, and more. However, there are flaws in the Bitcoin network that have allowed for certain miners to gain an unfair advantage at the expense of the well-being of the network itself, which should not be considered as an incentivized advantage anymore, but rather as an attack.

One of these attacks, coin-hopping, is described in a recent paper dubbed “Revisiting Difficulty Control for Blockchain Systems”. The author, who coined the term “coin-hopping”, describes the fundamental flaw that makes this attack vector possible and how it causes a negative impact on the health of the Bitcoin network and, consequently, on its end users.

The paper, which can be read here, also provides a solution for this problem, which is to be implemented in the upcoming Ergo Platform, a project that aims to provide solutions for various cryptocurrency problems.

So, what is the problem, exactly?

The Bitcoin network has a fixed issuance rate which means that when new miners join the network, this issuance rate doesn’t increase. Instead, the “mining difficulty” changes, ensuring that the aforementioned issuance rate remains somewhat stable.

However, the current readjustment algorithm in Bitcoin assumes that the network hashing power doesn’t change drastically between the difficulty retargeting periods (2016 blocks) but the paper demonstrates that due to the “continuous non-linear growth” of computational power, delay between blocks differs from the expected time by 7%, a worrying figure that is intensified by the coin-hopping attack. The paper reads

“In this paper we also consider a new type of miner behavior with regards to difficulty adjustment which provides an unfair advantage to the miner, and also makes inter-block delays worse. We call the discovered strategy the coin-hopping attack.”

In this attack, miners switch from one coin to another in the beginning of an epoch (difficulty retargeting event), switching back to the first one in the beginning of the next epoch when difficulty becomes lower.

This means that the miner leaves coin1 to ensure that mining difficulty is reduced by the lack of his presence and goes on to mine another coin2, returning to coin1 once the difficulty retargeting period has made mining easier again. This means that until the next epoch, the network will not adjust to the presence of the miner. The paper adds: “Remarkably, under such an attack the mean time between blocks in both chains will be bigger than the planned time.”

In order to fix these issues, an Improved Difficulty Adjustment is proposed: An algorithm that is both resistant to the aforementioned attack (and others that may be based on difficulty manipulation) and that allows for an almost constant desired block rate under real-life circumstances.

If you want to understand how this new difficulty adjustment algorithm can work, make sure to read the “Revisiting Difficulty Control for Blockchain Systems” paper. More information about the Ergo Platform can be found here.

Dmitry Meshkov will present this work during a blockchain workshop associated with ESORICS’2017: http://www.deic.uab.cat/~jherrera/CBT/.