Cryptocurrency startup Horizen (formerly zencash) has proposed a Penalty System to delay block submissions in order to prevent a double spend attack.
A double spend attack (also known as 51% attack) is theoretically a malicious event where attacker(s) can double spend their cryptocurrency or reverse their transactions.
The basis for this fraud is none other than the basic quality that makes the cryptocurrency decentralized: The power to verify transaction between consumer and provider without the need of a third party (banks).
Here is it how it happens: (Though the only reported instance till now is BitcoinGold back in May but it still remains a threat)
When a party signs a transaction, it is put into a pool of unconfirmed transactions. In order to add this block of transactions to the blockchain, miners find a solution to a mathematical problem. When a miner finds a solution to a block, it has to be broadcasted to the other miners.
But what if someone doesn’t broadcast the solution?
When the solution is not broadcasted, the attacker can effectively create a private offspring of the same block creating two parallel versions of blockchain.
One from miners that are broadcasting solutions as they go while other one is the attacker’s.
This transaction data will be stored on the real version while this isolated version has no record of the transaction which essentially means that the attacker has spent the coin on the public version but not on the private one.
Blockchain is programmed to be a democratic network. It follows the chain that has the most blocks because the greater majority of miners add blocks to their version of the blockchain faster than the rest of the network.
A competition starts. Majority of miners vs. the evil attacker. Who wins: superior hashrate.
If the attacker has support of superior hash rate the corrupt chain will be adopted, effectively allowing the attacker to reverse transaction or double spend.
What Horizen proposes in the document is to introduce a penalty. A punishment based on time for which the chain remains hidden from public.
The time will be evaluated in block intervals and not in time stamps.
The delay will prevent acceptance of that specific chain into the main block. What it means for the attacker is that they will have to continue mining the corrupt chain decreasing the chance of being accepted into the main chain as time moves on. This gives potential partners time to report or freeze the fraudulent deposits.
Although this delay will only act on privately mined blocks, the chances of double-spending in public chains is very low because other miners would be able to detect a fork in the chain and can call it out.
The chances of a 51% in future are very slim but with mining concentrations increasing in countries example China, we should be prepared.