An Overview of the Different Blockchain Consensus Algorithms
Although more casual, less-technical crypto-enthusiasts might not know much on this topic, an essential aspect of any cryptocurrency project is the consensus algorithm that it utilizes. These algorithms accomplish two major objectives. Firstly, it ensures that the next block in a blockchain is the true, master-version of the details. Secondly, it makes sure that those looking to take advantage of the system and fork the chain are stopped. Either way, the point is that consensus algorithms are the way that cryptocurrencies ensure that their digital tokens aren’t victim to double spending.
While essential, there have emerged a wide variety of consensus algorithms amongst the various cryptocurrencies, each with their own pros and cons. Below we will cover each one of them in more detail, but it’s also important to know some history behind how consensus algorithms came onto the scene.
The Byzantine Generals Problem
Before Bitcoin emerged, there were many different digital proto-currencies that failed because they weren’t able to solve the problem of creating consensus, or an agreement, between the millions of tokens that would exist in the marketplace.
This is what’s called as the Byzantine Generals Problem. First described by Robert Shostak and Marshall Pease in their 1982 paper with the same name, they used the comparison to a group of generals, each commanding a portion of the Byzantine army, laying siege to a city. These generals wanted to create a plan to attack the city but were faced with the problem of how to coordinate an attack amongst the various commanders, who were all some distance away. While some wanted to retreat and others wished the attack, the important thing was that all the generals needed to agree on a common decision, as a half-hearted attack by only some of the armies would lead to a complete disaster. Since these generals are physically separated, they will need to send their orders via couriers, which could fail to deliver the information or be intercepted by the besieged cities forces, who could then send false information. The problem is as follows; what system can the generals use to ensure their communication isn’t tampered with?
When applied to the real world, this analogy is similar to the situation between our computers and their communication systems. While there were some early solutions poised to fix this issue, it wasn’t until Bitcoin’s success that the Byzantine general’s problem found itself with a practical solution.
Proof-of-Work (PoW)
The Proof-of-Work (PoW) consensus algorithm was conceptualized back in the 1990’s, but its jump in popularity can be attributed to Bitcoin’s creator Satoshi Nakamoto. Even in 2018, despite being the oldest method with some notable disadvantages, PoW is still used by many cryptocurrencies to this day. Ethereum, Litecoin, ZCash, Monero and many others still use PoW, although it’s becoming less popular as time goes on.
PoW requires it’s participants to perform work that is mathematically intensive but easy to verify by other participants in the platform. Using Bitcoin as our example, the various “miners” compete to decipher complex mathematical puzzles formed from collections of transactions, known as blocks, verifying their validity before adding them to the blockchain network. Miners must first figure out the “nonce”, an arbitrary number used to begin the process of creating a hash. The downside to the PoW algorithm is that the process requires an immense amount of electricity and computational power. This makes the process largely inefficient. Additionally, despite the creators wish to have Bitcoin remain a decentralized entity, people and organizations that can afford faster and more powerful mining machines (ASIC’s) will have a better chance of mining than others. In the future, this will mean more and more bitcoin mining will fall into the hands of fewer and fewer parties, setting up a situation where these big mining pools can team up and launch a 51% attack on the network.
While that would be a doomsday-like scenario for the more libertarian-minded crypto-enthusiasts out there, it remains likely that the Bitcoin community would do something to address the issue before a hypothetical 51 percent majority would be reached.
Proof-of-Stake (PoS)
For the reasons mentioned above, some major currencies, Ethereum for one, are planning to switch to using a PoS consensus algorithm. While there are a variety of variations to the PoS methodology, in almost every case PoS requires participants to “stake” a portion of the coins that they hold in the network to verify transactions. As opposed to “mining” mathematically difficult problems to verify transactions, “minters” put aside some of their coins similar to a security deposit or collateral to gain the right to be a validator. The idea is that PoS deters bad behavior by having those with the most stake in the platform have the most authority to verify transactions. It’s a different approach to PoW, where potentially fraudulent behavior is deterred because it’s so computationally exhausting to rig the system.
When a validator discovers a block that they believe can be added on the chain, they validate it by placing a “bet” on it, and if the block gets approved, validators get awarded the fees associated with the transactions on the block. However, if a validator verifies a fraudulent transaction, they will forfeit their “staked” deposit of tokens. This way, as long as less money will be made from a faulty transaction than gained by the transaction fees, there’s a financial incentive for validators to remain truthful. In the past, “staked” tokens weren’t lost if an error was made as it was assumed that simply owning the token was considered proof enough that your interests were aligned with the platform. However, this proved to not be the case, and new systems such as Ethereums Casper protocol ensure that there are adequate punishments for fraudulent agents.
Delegated Proof of State (DPoS)
While similar to regular Proof-of-Stake, there are some important details that separate these two consensus algorithms. Instead of staking coins to validate transactions, in DPoS, token holders collectively “vote” for a group to serve as those responsible for authenticating transactions. The idea is that this way, the platform remains “decentralized” in that the entire network decides who validates transactions, but the actual process is centralized in the smaller chosen group — which helps improve transaction speeds overall. DPoS can be likened to a democratic election, where ongoing voting, reputation monitoring, as well as limitations ensure that validators remain honest and accountable. While DPoS is more scalable and faster, it does create a more centralized governance model that hasn’t been tested in large-scale projects yet.
Some experts, such as Ethereum co-founder Vitalik Buterin, believe that the DPoS system can still fail. The idea is that voters can remove authenticators who are doing a poor job or are dishonest. Buterin’s argument is that, just like in real-life democracies, an individual voter has little sway over the process and feels less incentivized to take action.
Proof of Authority (PoA)
A less centralized form of consensus algorithm, Proof-of-Authority means that transactions get validated by specifically approved accounts, similar to administrators. Unlike PoW or PoS, there are no “mining” or “minting” mechanisms involved. PoW algorithms tend to be used only on private blockchains, as opposed to public ones such as Bitcoin or Ethereum. Usually, a PoA chain’s authorities all have established identities, such as a specific corporation, with penalties largely existing outside of the blockchain system.
For example, if an agriculture company utilizes a private blockchain along with a supplier, retailer, and farmer, proof of authority would be a likely consensus algorithm, with the company that created the private blockchain application usually having the authority. Should a disagreement arise or if one party doesn’t uphold their arrangement, legal measures will be taken outside of the blockchain world.
Directed Acyclic Graph’s (DAG)
As the last topic we’ll cover in this article, DAG’s are not really consensus algorithms in the traditional sense. Directed Acyclic Graphs are seen as a potential competitor to blockchain technology, capable of creating new cryptocurrencies while avoiding some of the problems facing traditional consensus algorithms.
Proponents of DAG’s describe them as a cryptocurrency industry where there are no miners/authenticators, no issues with block sizes, no possibility of a 51 percent attack, all while remaining even more decentralized. While the technical details behind DAG’s are rooted in complex computer science, it’s not all roses this with technology either. While some blockchain companies, such as IOTA and Byteball are playing with DAG’s, some experts such as the aforementioned Buterin believe that DAG’s struggle to solve the scalability problem necessary for future wide-spread blockchain applications.
Final Thoughts
At the moment, consensus algorithms make trade-offs between scalability and decentralization, with one coming at the cost of the other. Proof-of-Work and Proof-of-Stake are the two most prominent consensus algorithms in the blockchain world today, with each taking a different approach in deterring fraudulent behavior. Smaller, private blockchains are more likely to use systems such as Proof-of-Authority, where most parties already know each other and can be contacted outside the blockchain. While more experimental alternatives are in the works, PoW and PoS remain the stables within the blockchain industry.
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://medium.com/blocktoken/an-overview-of-the-different-blockchain-consensus-algorithms-9434fc4827ba