Proof of Work vs. Proof of Stake
Blockchain is built on the principle of equality. It is a peer-to-peer system or agents with equivalent authority. If some agents in the system cease to exist, blockchain will continue to operate because of its decentralized nature. Peer-to-peer means sharing your personal resources with the network: disk storage, GPU/CPU power, RAM, network bandwidth, etc. This process consumes energy and therefore requires investment, reliability, and responsibility from agents in the network. For blockchain, such agents are miners and nodes.
It is important to incentivize agents to work honestly and provide the best service for blockchain stability. Since there are hundreds of thousands of nodes worldwide, achieving consensus among them is crucial. A consensus mechanism is an agreement or set of rules that every node must reach in order to validate transactions and blocks. If a block creates more Bitcoin than allowed, all full nodes will reject the block even if some miners accept it. That’s how it works - a block is only accepted if consensus is reached among all agents.
Let’s examine 2 types of common consensus algorithms: Proof-of-Work and Proof-of-Stake.
Proof of Work (PoW)
Proof-of-work (PoW) is the first consensus algorithm to be deployed. This consensus mechanism is used in Bitcoin, Ethereum, its variants such as Bitcoin Cash, Litecoin, Dogecoin and some other cryptocurrencies.
The Bitcoin blockchain can be implicitly understood as consisting of miners, nodes, and coin holders. Miners solve mathematical puzzles to receive rewards for finding new blocks and adding them to the chain. They also verify transactions and check them to prevent the system from double-spending. Nodes propagate the blockchain throughout the system (they store the entire blockchain history including transactions and blocks) and coin holders. They invest in cryptocurrency, using it for payment or buying and selling.
Miners are used in the blockchain in the PoW consensus mechanism. Miners solve mathematical puzzles (consuming energy, time, and GPU/CPU power). If one miner solves the puzzle first, they receive a reward for the proof of work completed.
Because there are thousands of miners, the system adjusts the difficulty of the puzzles at certain times to prevent blockchain from inflation (each block is created once every 10 minutes). The more miners in the game, the harder the puzzle. Mining difficulty is adjusted every 2 weeks.
The strongest miners don’t always win puzzle-solving. It’s a lottery game to prevent the system from being too centralized by mining pools. A mining pool is like a cooperative that pays dividends to participants based on the computing power they contribute. For example, if a mining pool finds a block, participants will receive dividends from it depending on the computing power they provided to solve the puzzle.
The biggest problem with PoW is energy consumption because electricity supplied to resources is only for mining coins. For that reason, Ethereum is planning to abandon PoW and move towards Proof of Stake consensus in the near future.
Proof-of-Stake (PoS)
Proof-of-Stake (PoS) works differently from PoW and does not reward finding blocks. There are also no miners working to receive rewards. Instead, the system selects a specific block creator depending on the size of the stake. Block creators are called forgers (the PoS equivalent of miners). Forgers take network fees as rewards for validating transactions. Transaction validation is the process where each transaction is checked to protect the system from double-spending or Sybil attacks. Blockchains using PoW consensus mechanisms, for example Bitcoin, Litecoin, Bitcoin Cash, and Bitcoin Gold always face the risk of being attacked this way. When PoW mining difficulty decreases, hackers can easily buy enough power to perform a 51% attack.
Peercoin was the first cryptocurrency to use the PoS consensus algorithm. Cryptocurrencies currently using PoS include: DASH, NEO, Decred, QTUM, Komodo, Waves, etc.