Proof of Work vs Proof of Stake | Deb Dobson | Pulse | LinkedIn
I've previously written about some blockchain use cases, along with a blockchain 101 article for those who are just learning about the technology. This article will focus on two consensus algorithms - Proof of Work vs Proof of Stake.
First a little background, blockchain is a shared ledger distributed across a network and can be either permissioned or permissionless. Permissionless networks are open to any participant, and transactions are verified against the pre-existing rules of the network. Any participant can view transactions on the ledger, even if participants are anonymous. Think bitcoin.
Permissioned networks only allow specified actors (banks, approved individuals, etc) to submit transactions or validate the network. Also, participants can only view the transactions relevant to them.
Regardless of its permission a shared public ledger needs a functional, efficient and secure consensus algorithm to function on a global scale. Entries in the ledger are synchronized to all ledgers in the network. Each copy of the ledger operated by a participant in the blockchain network is called a node. Consensus among the nodes ensures that the shared ledgers are exact copies, and lowers the risk of fraudulent transactions, because tampering would have to occur at many places at exactly the same time.
To reach consensus, all participants agree to the transaction and validate it via the peer-to-peer network. Participants can also establish rules to verify transactions. A trusted network of participants reduces the costs of establishing consensus among nodes, relative to the higher costs in permissionless blockchains.
Proof of Work Consensus
Proof of work (PoS) is a requirement to define an expensive computer calculation, also called mining, that needs to be performed in order to create a new group of trustless transactions (the so-called block) on the blockchain.
Transactions are bundled into a block for miners to verify that transactions within each block are legitimate. In order to do so, miners must solve a mathematical puzzle known as a proof-of-work problem. A cryptocurrency prize (reward) is given to the first miner who solves each blocks problem. Once verified, the transactions are stored in the public blockchain.
PoS consensus algorithms require a lot of energy. One bitcoin transaction required the same electricity as powering 1.57 households for one day (data from 2015). In recent research, experts argued that bitcoin transactions may consume as much electricity as Denmark by 2020.
PoS is not only used by the bitcoin blockchain, but also ethereum and many other blockchains.
Proof of Stake Consensus
Proof of stake (PoS) is a different way to validate transactions based and achieve the distributed consensus. It's still an algorithm, and the purpose is the same as proof of work, but the process to reach the goal is different.
Unlike the PoW system where the algorithm rewards miners who solve mathematical problems with the goal of validating transactions and creating new blocks, with proof of stake, the creator of a new block is chosen in a deterministic way, depending on its wealth, also defined as stake. Miners take transaction fees because there is no block reward. In the PoS system, miners are called forgers.
Since developers are worried about the proof of work energy problem, the Ethereum community wants to exploit the proof of stake method for a greener and cheaper distributed form of consensus.
Which is Safer?
Experts are worried about which is safer from the possibility of hacker attacks, especially if money is involved. Using a PoW system, bad actors are cut out thanks to technological and economic disincentives. Programming an attack to a PoW network is very expensive and you would need more money than you would be able to steal.
A PoS network would be cheaper to attack. To make the algorithm as bulletproof as possible, Ethereum plans to move to the Casper PoS algorithm which is a security-deposit based economic consensus protocol. The nodes (bonded validators) have to place a security deposit, an action called bonding, in order to serve the consensus by producing blocks.
A possible future switch from PoW to PoS consensus algorithm may provide the following benefits:
- Energy savings
- A safer network as attacks become more expensive; if a hacker would like to buy 51% of the total number of coins, the market reacts by fast price appreciation