Measuring expected block timing for Difficulty Adjustment

Blocks are expected to be added to the Bitcoin blockchain every 10 minutes

However due to a variety of circumstances, this doesn’t always occur.

Speculation over the last day is around there being a fire at a large mining farm, however the validity of those claims is less relevant to the discussion because a variety of factors could occur at any time. We’ve seen flooding, fires, power outages and more all affect it.

This is something that has been discussed by Jared Tate, founder of DigiByte, on a number of occasions over the years. It was this slow adjustment that was the inspiration behind DigiShield in the first place, which DigiByte pioneered in early 2014. It was subsequently implemented by DOGE with the DigiByte developers assistance, and can now be found in everything from BCH / BSV to ZCash.

What is DigiShield?

DigiShield is a real-time difficulty adjustment algorithm.

Instead of taking 2 weeks to adjust as Bitcoin does (or 3.5 days for Litecoin), DigiByte adjusts it’s difficulty every single block. It is this difficulty that determines how often a block is expected to be found by the expected hash-rate, to maintain the intended block timing.

It does this asymmetrically and allows for the difficulty to rapidly rise and fall, to account for an influx / outflow of hashrate on any given blockchain.

NOTE: DigiByte now being MultiAlgorithm maintains 5x independent difficulties for each of the 5x algorithms that compete in every single block.

There are dozens of blockchain projects utilizing DigiShield, and for good reason: It’s simply more accurate with the block emission schedule, and it prevents things like chain freezes. This was why DOGE implemented DigiShield originally, after blocks were taking almost days to be found in early 2014.

This subject also came up recently when the Litecoin block reward halving event occurred and the block timing was completely crazy. It has since slowed significantly, putting block timings all over the show. It was for this reason that I submitted a proposal for Litecoin to adopt DigiShield.

A more uniform, reliable emission for block timing is beneficial for all. There is no down-side to having a more reliable emission curve.

Just how good is DigiShield?

I look at the last 24hrs worth for Bitcoin, Litecoin and DigiByte (With DigiShield). Using 144, 576 and 5760 blocks respectively to get the data, and compare the time it should have taken vs the time it actually took.

Current: 597311, 2019–09–30 22:53:25
144 blocks ago: 597167, 2019–09–29 20:52:41
Out by: 2 hours and 44 seconds (8.4%)

Current: 1711657, 2019–09–30 23:05:30
576 blocks ago: 1711081, 2019–09–29 21:49:12
Out by: 1 hour, 16 minutes and 18 seconds (5.3%)

Current: 9521659, 2019–09–30 23:02:48
5760 blocks ago: 9515889, 2019–09–29 23:00:52
Out by: 1 minute and 56 seconds (0.1%)

That’s quite a difference between the three!

Clearly the realtime difficulty adjustment of DigiShield is working quite well, keeping the block emissions within 0.1% of their expected emission schedule.

What if we look at 10 days worth?

Good question, let’s look back a bit further and see, taking the same 10 days worth from the aforementioned “current” blocks for all three projects.

1440 blocks ago: 595871, 2019–09–21 05:36:23
Out by: 6 hours, 42 minutes and 58 seconds (2.8%)

5760 blocks ago: 1705897, 2019–09–20 17:33:24
Out by: 5 hours, 32 minutes and 6 seconds (2.3%)

57600 blocks ago: 9464059, 2019–09–20 23:11:23
Out by: 8 minutes, 35 seconds (0.06%)

We can see BTC / LTC even out a further over the long term, but BTC swung from almost 7 hours too fast to 2 hours too slow.

These wild swings are not helpful when you are waiting for a transaction.


Sometimes it’s easier to visualize how far off the expected block time these projects are, if we put it in to a graph form. I found this fascinating:

Image for post
Image for post

We can see here that DigiBytes variation both over 1 day or 10 days is far, far superior. As such, I have no hesitation in suggesting that DigiShield be should seriously be considered by any project.

Written by

I write interesting things about cryptocurrency, especially DigiByte

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store