DigiShield

From DigiByte Wiki
Revision as of 15:38, 23 August 2018 by Dgb chilling (talk | contribs) (First attempt at rewriting this for layman explanation, needs more added to the end of it)
Jump to navigation Jump to search

DigiShield overview

Activated in February 2014, this hard fork allowed for the DigiByte blockchain to protect against multi-pools that mine large numbers of DigiByte at a low difficulty. It achieves this protection by recalculating block difficulty between each block, allowing for a faster correction when a multi-pool begins or ceases contributing to DigiByte, rather than recalculating once every fortnight (2 weeks) as is the case with Bitcoin.

Since inception, DigiShield has been added into over 2-dozen other cryptocurrency blockchains such as BitcoinCash, ZCash, Dogecoin, Startcoin, AuroraCoin, BitcoinGold, BitTokens, CasinoCoin, CreativeCoin, Granite, Huncoin, Monacoin, Mooncoin, Nautiluscoin, Quatloo, SakuraCoin, Scorecoin, SmartCoin, StartCoin, SuperiorCoin and Ubiq.

DigiShield has *no* effect on 51% hash-power attack mitigation.

A simple explanation of difficulty retargeting

This is an explanation of difficulty retargeting, knowledge of this is needed in order to understand the value of DigiShield.

In order to maintain an "average" block timing, blockchains such as Bitcoin, Litecoin and DigiByte all use different methods of "difficulty retargeting". The idea being that as there are more miners (Or more specifically, more hash-power provided by the miners) trying to find the next block, it needs to become harder and harder to find the blocks.

DigiByte has a 15-second block timing target, meaning mathematically based on the previous blocks, along with a little bit of chance / randomness, the "difficulty" in finding the cryptographic answer for each block will become harder or easier in order to maintain an approximate 15-second block timing.

Miners will regularly change between the blockchains that they mine, in order to maximize their profits. For example, GPU miners may switch between mining ZCash, Vertcoin and DigiByte, depending on what they are able to mine most profitably at the time. This profitability is determined by the current value of the coin, block rewards (new coins given in a block), block difficulty and block timing.

As more miners begin to mine, they bring their larger amounts of hashing power, and so blocks begin to get found more frequently. As the blocks are found more frequently, the traditional blockchains such as Bitcoin will only adjust the difficulty level every 2016 blocks (Approx every 2 weeks). For Bitcoin, this means that if a large number of miners with their hash power begin instead to mine Bitcoin Cash, the blocks for Bitcoin will slow down and not be found as regularly. Conversely, if miners bring their hash power from Bitcoin Cash to Bitcoin, the blocks will be found a lot faster. Then, every 2016 blocks, the entire blockchain uses some clever mathematics to decide how "difficult" it should be for the next 2016 blocks, based on how fast blocks were found, averaged out over the last 2016 blocks.

For further info on the math behind Difficulty and how it's calculated, see the Bitcoin Wiki

How DigiShield differs & why it matters

DigiShield adjusts after each block, rather than once every 2016 blocks. DigiShield is designed to "fall" very fast, in order that the chain doesn't freeze.

Freezing would occur a lot back in 2014 with the traditional difficulty retargeting system that Bitcoin / Litecoin use, when proof-of-work mining was relatively young. As miners would hop between Litecoin, DigiByte and Dogecoin with their GPU mining (Back when you could mine Scrypt coins on a GPU profitably), DigiByte and Dogecoin especially would end up with a "frozen" chain, where it takes too long to find a block.

It would take too long to find a block, because profit-switching miners would bring their hash power when difficulty was low, they would mine DigiByte for a number of blocks, the difficulty would adjust to account for a 10-fold hash power increase, and then the profit-switching miners stop mining DigiByte (As the profitability has decreased due to the difficulty increase) and they would then move over and start mining Dogecoin.

The difficulty of DigiByte would then be astronomically high, while the amount of miners and hash-power becomes increasingly low, meaning the blockchain could go several hours without a single block being found. Naturally this is highly undesirable, as it could mean waiting for several hours for a transaction to process.

DigiShield was created to account for such wild fluctuations, so that the blockchain doesn't "freeze" when a large exodus of hash power occurs, and also so that miners don't benefit from low difficulty for a number of blocks.