Lottery based consensus in Blockchain

Lottery based consensus in Blockchain

Proof of Work(PoW) and Proof of Stake(PoS)

We have all heard that the winning block is determined by a consensus algorithm while learning about blockchains. Here's an overview of consensus algorithms.

Consensus refers to agreeing upon a final state of data among nodes of a network. A single network contains many nodes and deciding which block is needed to be added to the network becomes really difficult. As we know blockchain is completely decentralized and so a single entity can decide which block should be selected. In this case, we use a consensus algorithm.

There are two types of consensus mechanisms in distributed networks:

  • Lottery based consensus

  • Voting based consensus

Proof of Work(PoW)

Proof of Work is one of the most commonly used lottery-based consensus mechanisms. All the nodes need to compete in order to solve a cryptographic puzzle. Whoever solves this puzzle will be selected as the leader, and all other nodes can verify the leader's legitimacy by checking the puzzle. This puzzle is solved by nodes called miners.

Proof of Stake(PoS)

The Proof of Stake consensus algorithm came into the picture in the year 2011. Each method is aimed at selecting a block for the blockchain. High computational capabilities are required by PoW, which means a huge amount of power and electricity must be used. Since PoS would depend more on the number of coins a person held than on computational power, the problem was solved. However, 51% of the bitcoin network is vulnerable to an attack. In the PoS system, blocks are forged not mined. The people who validate the transactions and create new blocks have to put their coins at 'stake'. If they validate a fake transaction, they lose their coins as well as their rights to participate as a forger in the future. The forger is chosen randomly, depending on the stake. The single richest member is guaranteed the advantage on the system according to stake selection, which would result in an undesirable centralization. Selections have been made using a variety of methods.