Difficulty algorithm


I decided to move our short dialog from bitcointalk to this place. My suggestion there was:

  • " Why not to develop NH-resistant algorithm for difficulty computing ? For example, you can compute average hashrate during 1 week and one standard deviation for this period. If at some moment the network hashrate jumps over that standard deviation, the difficulty goes to the moon until the moment when the hashrate returns to the normal interval. "

The Dev replied:

  • “… its tough to control/regulate such if you wana keep decentralization word in your blockchain.
    NH can be protected only if natural hash rates grows. But believe well established blockchains too have to deal with this. Diff calculation algo is one of the most critical part of any blockchain and numerous research papers and algos have been put with their own pros and cons.
    If as per your say if avg hashrate of one week is calculated then chain have to wait for almost another week to find next few blocks after NH user leaves. Also we are working to improve algo to tune better.
    NH have cost attached and atm its not economically profitable to use Nicehash and get some DERO, its much cheaper to buy DERO on exchange. To all who are expecting better exchange, we are exploring that.”

My answer now:

  • So, I see your point that in such a way we will create a “feedback system”, and the difficulty will rest too high after the NH user leaves. But why not to skip the period with abnormal hashrate from the computation of the average hashrate and one standard deviation ? In this case we can provide smooth changing of the difficulty of the network. The negative point is that someone could block the coins emission, but this will cost a lot of money for him. But I am not an expert in this topic, so I completely rely on your opinion. Thank you for your attention !


Hi, its nice that you think about protecting the network. I see the following problems with your idea:

  • NH user comes, drives hashrate up - network completely stops (because of extreme difficulty) for as long as the NH user wants, coin is unusable, people panic
  • coin price moons, many small miners suddenly join to mine, suddenly high hashrate, network also stops


Ok, I agree. There could be problems, but still I think this algo could be tuned by parameters. Maybe it is better not to implement such an extreme NH-protection, but a soft variant just to reduce the profitability of the NH users. In any case, I gave you my idea, after it is up to Dev, implement it or not. I’ m not an expert.

Also I would like to say that I am very happy, that I found such a nice project. I like CryptoNight algo because it is ASIC-resistant and unonymous, and to marry it with smart contracts is a great idea ! I have read all the 59 pages on bitcointalk and believe in your team. Whatever price of Dero goes, to zero or to thousands euros, I will keep the coins because I believe in this technology. It looks like I found Microsoft on the very beginning stage. Good luck !


Thank you @Mik for your support and encouraging words.
Will PM you some resources/discussions on DIFF give a look.
DIFF algos are topics of serious discussions and need much more research.
We need to plan out something more.


Here is a discussion by zawy about using EMA rather than SMA for difficulty calculation