One of cryptoâs most feared attacks may have an elegant solution.
At least, thatâs according to the team behind cryptocurrency project Horizen â formerly zencash â which saw more than $500,000 hacked from an exchange in such an attack, called a 51 percent attack, earlier this year.
This attack happens when one single malicious miner controls more than 51 percent of the compute power on a blockchain network and can then inject false transactions into the system.
In a paper released today, the Horizen team claim to have found an innovative solution â by updating their proof-of-work consensus algorithm with a so-called âdelay functionâ that penalizes miners that could be preparing for such an attack. Horizen is a fork of privacy-oriented crypto zcash, which is itself a fork of bitcoin.
Because a 51 percent attack requires a miner to produce blocks in secret before posting them to the blockchain, co-founder of Horizen Rob Viglione said a delay function allows for penalties that make such attacks prohibitively expensive.
âSo what it does is essentially it poses a massive cost, a 10x cost, on trying to launch one of these attacks,â he told CoinDesk.
Stepping back, the 51 percent attack has been a part of many crypto enthusiastâs awareness this year, after five major cryptocurrencies lost money due to the attack in June.
Because they damage the confidence in the security of cryptocurrencies more broadly, Viglione described such attacks as a ânegative externality on the entire industry.â
And with direct insight into the attack â the 51 percent attack on Horizen resulted in 36 fake blocks being included in the blockchain â Viglione said:
âRight after the attack our engineers started brainstorming and we think we have a very elegant, simple solution to make sure that this doesnât happen again.â
He continued, âTechnically, to make it costly if it were ever to happen again.â
To do this, Horizenâs new algorithm introduces penalties for delayed blocks â those that are broadcast to the network a long time after the latest block.
In effect, the new code release modifies a feature of the underlying consensus algorithm, the so-called âlongest chain rule,â with a delay function.
For example, if a block is proposed that is 5 blocks or more behind the most recent, a penalty is introduced, Viglione said. That quadratically increases the amount of blocks a miner needs to produce in order to have transactions accepted onto the chain, he continued.
As such, the chances of a 51 percent attack are decreased.
And because of the nature of Horizenâs architecture, such a penalty should only occur if the miner is malicious, Viglione said.
âWe have an average block find time of 2 and a half minutes, maximum latency to broadcast anywhere in the world is like one or two seconds, so thereâs no way you could be 5 blocks behind legitimately,â he explained.
This though, Viglione noted, could cause a network partition to occur on the blockchain, as multiple chains of blocks compete to be recognized as the honest chain. In this case, Viglione said miners will vote to determine which chain is legit.
âThey essentially elect which chain is legitimate and they start mining on that just like they would any longest chain rule,â Viglione said.
Additionally, to prevent such network splits from being permanent, Viglione said that penalties decrease on the accepted chain.
âBlocks are added and thereâs a negative one decrement to the penalty that was previously assessed, so thereâs always a convergence that can happen to prevent the network partition being permanent,â he told CoinDesk.
Accompanying the release, a white paper states that should a chain of blocks be rejected due to being too far behind the most recent block, exchanges can freeze suspicious deposits until the situation is resolved.
Additionally, Viglione said the specifics of the penalties can be tweaked depending on network conditions.
âWe can tune and dial up the cost if we ever think itâs insufficient relative to hashrates and all that,â he told CoinDesk.
Still, itâs worth noting that such changes have long been the subject of research, and others are skeptical about whether Horizen can achieve its claims.
For example, leading ethereum proof-of-stake researcher Vlad Zamfir noted that while he had yet to dig into Horizenâs new code, âthe design space doesnât include miracles.â
Additionally, consensus researcher Emin Gur Sirer expressed skepticism, telling CoinDesk, âthese protocols are subtle and difficult to get right.â
But, following several months of testing, Viglione is confident that the new algorithm works well in practice, and hopes it can set an example for the broader cryptocurrency industry.
âWeâve been testing it internally for a little while now, a couple of months, so weâre pretty confident with the code,â Viglione said, adding:
âIâd imagine that other projects should, they really should update their code as well.â
EDIT (16.20 UTC October 10 2018): This article has been updated to reflect that the victim of Horizenâs June 51 percent attack was a cryptocurrency exchange, not Horizen itself.
Cut wire image via Shutterstock