Consensus algorithms or mechanisms are the backbone of any blockchain network, as they ensure that all transactions on a blockchain network are valid and secure. But more importantly, this process is what keeps any blockchain working.

We need these mechanisms because there is no central authority to validate the balances and the transitions in the blockchain. For instance, when we send money from one bank account to another, we do so because we trust the bank’s records, as it won’t allow its client to initiate a transaction that’s worth more than their balance, or send the same amount of money to two different accounts.

In a blockchain, this intermediary is replaced by a mechanism where network members take on the task of validating the authenticity of transactions, and the newest versions of the ledger, AKA blocks. In other words, these mechanisms make sure there is consensus about which block is the right one and which ones are fake, and this is why we call them consensus mechanisms.

There are hundreds of types of consensus mechanisms, but two of these are the most used and trusted: Proof of Work and Proof of Stake.

Proof of Work

Proof of Work requires validators or miners to solve complex mathematical puzzles in order to add new blocks to the chain. This process is known as mining, and it requires a lot of computing power. The miner who solves the puzzle first gets rewarded with cryptocurrency for their efforts, whether it’s new coins or the fees users pay in exchange for validating their transactions.

The main logic behind Proof of Work is that the computing power spent by validators – which any possible attack would need to match – would be so big that the attack would be unprofitable if not near impossible. This is the mechanism used by Bitcoin and most of the early cryptocurrency projects.

Proof of Stake

A different approach is taken with the Proof of Stake, as it depends on handing the responsibility of validating transactions and blocks to those who own a particular amount of the cryptocurrency. In this case, users have to lock or “stake” their assets in a smart contract dedicated to the mining process. This way, it would be in the validating users’ interest to maintain the integrity and safety of the blockchain to protect the value of their assets.

Another popular version is Delegated Proof of Stake (DPoS), in which users vote using their assets to select delegates that would take on the validating process.

Proof of Stake is used by many major crypto projects, including the likes of Ripple’s XRP, Cardano, and Polkadot, as well as Ethereum – the second largest blockchain – that moved from Proof of Work to Proof of Stake back in September 2022.

Which one’s better?

Both PoW and PoS ensure the safety of the blockchain networks, but some technical differences make one or another favorable for different projects. 

Team Proof of Work argues that it’s safer than proof of stake, as it requires physical hardware and power to validate, which would make it very costly for any potential attackers, unlike Proof of Stake which could face what’s known as governance attacks. This kind of attack happens when an attacker manages to hold enough voting power to manipulate the blockchain or to get changes to the blockchain rules passed through. 

On the other hand, team Proof of Stake argues that Proof of Work is not sustainable, as it consumes gigantic amounts of energy, produces a lot of e-waste in the shape of outdated devices used for mining, and requires a lot of resources to keep the blockchain going.

Both the PoW and PoS consensus algorithms offer unique advantages for different types of blockchains. While PoW has been the more popular choice in terms of security, PoS has been gaining ground due to its energy efficiency. Ultimately, whichever consensus algorithm is chosen highly depends on the goals and needs of a particular blockchain, and the criteria are case-by-case.

More