As we dove deeper into a crypto-talk, a friend asked me to explain the differences between the two major consensus mechanisms used by current blockchains, Proof of Work & Proof of Stake. I thought I understood them well enough to demonstrate them in simple terms. I didn't. So I revisited my info sources, in order to get a better mental grasp on the topic.

What is a consensus mechanism

Consensus mechanism is the method by which a distributed network agrees to a single source of truth. Dissimilar to centralized systems, a distributed network is maintained by independently operated nodes. In pursuance of a collective agreement - a consensus - on which record of data is the most accurate, network nodes must share an identical cryptographic mechanism.

Proof of Work (PoW)

Satoshi Nakamoto popularized the "proof-of-work" model in '09, when he described how the mechanism works in Bitcoin's whitepaper. PoW consensus is the most reliable and widely understood model in the blockchain ecosystem, to this day.

Each transaction in a blockchain requires validation. With PoW consensus mechanism, mining nodes, called "miners", have to solve a complex cryptographic puzzle. Every puzzle solution (called hash) results in validating a transaction.

Miners use computational units (computers) to solve the cryptographic "riddle". These units consume energy (electricity) while processing.

All miners in the blockchain compete with each other. The fastest solver transmits the puzzle's answer to the rest of the nodes, who then verify that the solution stands correct. In that way, a transaction is validated by the network and added in the block.

For every transaction they validate, miners are remunerated with a block reward and transaction fees, in the form of blockchain's native coins.

Proof of Stake (PoS)

The proof-of-stake consensus was first presented in an academic paper by Sunny King and Scott Nadal in 2012. They devised it aiming to tackle the problems arising by the PoW-based systems. Especially, the huge energy expenditure required for maintaining PoW blockchains.

Contrary to PoW, which uses computational power, Proof-of-Stake utilizes currency power:

Instead of considering the secondary cost of electricity to run a PoW node, validators on PoS chains are forced to directly deposit a significant monetary amount onto the network. 

In PoS, validators (instead of "miners") can verify transactions based on how much native coins of the blockchain are staking in the network. The term "mining" isn't compatible with the PoS system, as validator nodes don't "mine" blocks into existence. They certify (or attest to) blocks, after the network creates them.

In short, PoS described in steps:

  • Validator node stakes native cryptocurrency in the network.
  • When a new transaction has to be validated, network chooses a validator based on their stake, pseudo-randomly. For example, a validator holding 10% of the total stake in the network, will validate 10% of transactions.
  • After that, the rest of the validator nodes of the network will authenticate the validation.
  • If the original validator is found to have acted maliciously, he will be penalised (by losing portion of his stake). If not, he will be rewarded with the transaction fees.

And a quick takeaway

Knowledge parity between all involved parties is what decentralized blockchains are for. Consenting (as a network) to the most accurate record of data lies in the foundation of distributed systems. And as Lex Fridman - in the podcast with Algorand's founder, Silvio Micali - really simply puts it:

"The effort (work, stake, energy, etc.) you put in (validating a transaction) is somewhat correlated with the trust you should be given, to add (records) into the ledger (blockchain)."