Sophisticated consensus mechanisms
In the world of Bitcoins and Altcoins (cryptocurrencies based on the blockchain developed by the Bitcoin core team), the Proof of Work (PoW) mechanism is used for consensus. PoW was originally a protocol developed with the primary goal of preventing cyber attacks, such as a DDOS attack. The idea behind PoW was first published in 1993 by Cynthia Dwork and Moni Naor, and used in the Bitcoin white paper as it allows for trustless and distributed consensus. This protocol requires participating nodes to perform an intensive form of calculations (also called mining) in order to create a new group (or block) of trustless transactions on the blockchain. The mining of transactions is necessary for two reasons:
- Verifying the legitimacy of transactions
- Creating new digital currency to reward miners for executing the first reason
To verify these transactions, the miners need to solve a mathematical problem (or puzzle). The first miner that solves this puzzle gets the reward (in the form of new cryptocurrency) and a transaction fee amount supplied by the transaction owners. Verified blocks of transactions are permanently added to the public blockchain ledger, and with every new block, the puzzle gets a bit more difficult. This requires miners to work more efficiently over time. Miners who can deliver more computing power are usually the ones that solve the puzzle the quickest.
Luckily, there are other ways to verify transactions. A mechanism known as Proof of Stake (PoS) is an algorithm with the same end goal as PoW. However, the way it achieves the objective is different. The main difference between PoW and PoS is that with the latter, participation is restricted to the participants that have a legitimate stake (wealth) in the blockchain. Instead of all participants (or stakeholders) trying to confirm the validity of the information submitted, this consensus method chooses an individual to approve it by running a type a lottery. The chance of your being chosen is calculated based on your proportional stake (wealth) in the network. For each X amount of stake a participant holds, they get a lottery ticket. When it is time to verify and create a new block of transactions, the network chooses a lucky winner to announce their conclusions. Where a PoW-based blockchain rewards a miner for solving (mining) the mathematical puzzle to create a new block, a PoS-based blockchain does not reward an individual for creating a new block. Rather, the individual receives compensation (in the form of collected transaction fees). Thus, the term mining is replaced with the term forging, where a block is forged rather than mined.
This is demonstrated in the following diagram:
With PoS, the creator of a new block of transactions is chosen based on their stake (wealth).
The preceding diagram shows the main difference between the two consensus methods. The PoS consensus method has advantages over the PoW method, as it does not perform useless calculations in order to create a block. This prevents a lot of energy from being wasted and is more cost efficient. Also, the PoW protocol is sensitive to a 51% attack, where an individual controls a minimum of 51 percent of the total computational power available in the entire network. With the PoS protocol in place, it is much harder to execute this type of attack because an individual needs to own 51 percent of the total amount of wealth (assets/coins), which is very unlikely.
The PoS protocol also has a variant called the delegated proof of stake (DPoS). The main difference between the two is analogous to the difference between a direct democracy, where you vote for a specific person, and a representative democracy, where you select a group of voters who then collectively vote on a specific person. With a DPoS, the participants choose an entity to represent their collective stake in the blockchain. Thus, you decide which entity, also called a delegate node, will represent your stake in the blockchain. This allows you to join a team in order to magnify your stake. This helps balance out the power of large stakeholders. In Chapter 4, Blockchain 101 - Blocks, Chains, and Consensus, I will address these protocols in more detail.