Bitcoin and Ether are the two most famous cryptocurrencies and the hottest examples of blockchain technology in use.
Both use the ‘proof of work’ (POW) consensus algorithm. Information currently available indicates that Bitcoin will continue to use POW, however, the Ethereum project team is working on their planned transition to the ‘proof of stake’ (PoS) algorithm.
This transition is a high-profile one, and the crypto community is very keenly watching it, because many blockchain start-ups have launched their projects using the Ethereum blockchain platform, and Ethereum is very important.
Many wonder what POW is, what does PoS do, and what are the pros and cons of each. I compare POW vs. PoS in this article and address these questions.
The promise of the blockchain technology:
Before you dive deep into the POW vs. PoS comparison, let’s step back and revisit the promises of the blockchain technology.
Did you book your hotel for the last vacation using Booking.com? It’s a marketplace that charges a commission from the hotels.
The hotels provide the hospitality services to you, and you pay the hotel. Booking.com adds intrinsic value to this transaction, however, they charge commission because the hotels use their centralized platform to reach a wider customer base. That’s a centralized system, and Booking.com is the middleman.
If you book your next hotel through LockChain.co (https://lockchain.co/) you could get a better deal because this marketplace doesn’t charge commission from the hotels, hence the hotels don’t need to pass that on to their customers. You communicate with the hotel directly.
LockChain uses decentralized blockchain. A public, permission-less blockchain is decentralized by design, where the computers on the network, called ‘nodes’, maintain a distributed database in a shared manner.
All nodes have the entire transaction history of the blockchain, hence the technology is also called ‘distributed ledger technology’ (DLT). There is no central server, no middleman. All nodes have equal authority.
Did you wonder how to find out whether the diamond in the latest jewelry you bought was ‘blood diamond’, i.e. diamond extracted from mines in violence-torn countries where oligarchs control mines and employ slave labor working under inhuman conditions?
You have likely struggled to find reliable information because middlemen working at different levels tamper records to such an extent that real source of the diamond may never be known.
Download Our Project Specification Template
However, if you buy your next diamond necklace from vendors that use IBM’s TrustChain (https://www.trustchainjewelry.com/ ) then you can find out the exact lifecycle of the diamond from the mine to the retailer, and it is genuine information.
TrustChain uses blockchain where records are immutable and permanent, no one can tamper with the data.
Decentralization and immutable records are the key promises of blockchain and consensus mechanisms such as POW or PoS algorithms provide for these.
Why is consensus algorithm important in blockchain?
I will use the Bitcoin network as the example to explain the importance of consensus algorithm. Bitcoin is a public, permission-less blockchain where anyone can join including anonymous and pseudonymous users. It’s a payment network where the transactions are done using the native cryptocurrency Bitcoin.
The nodes in this network are also called ‘miners’. Bitcoin users give transactions to the miners for processing. Bitcoin transactions are first grouped in a temporary pool called ‘mempool’.
A block record, called ‘block’, comprises a few transactions, and are linked by the protocol program of Bitcoin in a peer-to-peer (P2P) network. Blocks are stacked one on top of the other in this chain.
A block is created every 10 minutes, where transactions from the mempool are included after they are validated by the miners. Every Bitcoin mining node has equal authority, can validate transactions and create blocks.
This poses a potential problem. What is every miner independently collects the transactions in the mempool and creates their own blocks?
As you can see, the same transaction will then be included in multiple blocks, and the same Bitcoin will be spent multiple times! This potential problem is called ‘double-spend’.
In another potential problem, a miner can create a block that doesn’t conform to the Bitcoin community standards. While the other nodes can ignore that block and not build on top of that, the non-conformist miner can keep creating blocks on top it. Even now the other miners can ignore this phenomenon, but we already have another chain in the network!
The problem gets worse if there are other miners who like that non-compliant block and keep creating new blocks in that second chain.
With the new non-compliant block attracting more miners the new chain will have a more economic impact, and the community will be forced to implement a ‘hard fork’, i.e. take the state of the network prior to dispute and move away with that chain. While it’s a solution, frequent hard forks make the network unstable.
There’s also the possibility that a rogue miner floods the network with a very high number of fake transactions and cripples all other miners. This is called a ‘distributed denial of services’ (DDoS) attack, and the rogue miner completely takes over the network and causes double-spends at will.
These threats can completely neutralize the promises of the blockchain, therefore the blockchain-crypto developers have designed consensus mechanism to prevent these.
What is proof of work (POW)?
“Show us that you did the work, and we’ll let you create the new block” – this is the essence of the blockchain poor of work consensus algorithm. Cynthia Dwork and Moni Naor had first published the idea in a 1993 article, whereas the name was coined by Markus Jakobsson in 1999. When ‘Satoshi Nakamoto’, i.e. the pseudonymous person or group, created the Bitcoin blockchain network, they implemented the concept.
The Bitcoin user gives the transaction data to a miner, whose job it is to validate the transaction and get it included in the next available block. The miners may not hold any Bitcoin, but they get a fraction of the coin minted as part of the block generation as their reward, and hence mining is a competitive process.
The miner needs to solve a complex cryptographic puzzle to create the new block. Every block in blockchain has the details of the transactions it includes; however, it also has a unique cryptographic hash of its’ own. The miner needs to provide both the transaction data from mempool, and the hash value of the last recorded block to create a new block where the transactions will be included.
The hash of the last recorded block isn’t known to anyone. The miner needs to find it, and that’s the cryptographic puzzle. The miner needs to try one number after another, and there is no skill involved in solving this puzzle. The other miners also have their users’ transactions that they try to include in the next block. It’s the brute computing power alone that decides who will win this competition after performing a massive number-crunching at high-speed.
The miner who cracks it first announces it to the network, and the other nodes then review it. The miner gets to create the new block and gets his reward, whereas the transactions from the mempool now get recorded into this new block. No existing block can be deleted or modified, adding a new block is the only way to update a blockchain.
Read How We Helped a Marketing Company to Build a Back-Office Custom Ads Dashboard
The miners need powerful hardware for mining, and they often use Graphics Processing Units (GPUs) along with their computers’ CPU for Bitcoin mining. The operations also need a very high amount of electricity.
The cryptographic puzzle is asymmetric, i.e. it’s moderately hard for the miners to solve, but very easy for the nodes in the network to review. Over time, miners find it easier to solve the puzzle, and the block generation time tends to reduce from 10 minutes. Hence, the Bitcoin community modified the puzzle every 14 days and makes it more complex.
This means that the miners will need to bring more computing power with them to solve the puzzle in the future and this way the computing power requirements keep increasing. The electricity requirements to run such powerful computers also increase.
The hackers that want to capture this network face the formidable hurdle of overpowering this network with powerful computers in each node. If the hackers want to launch a DDoS attack, capturing 51%, i.e. a majority of the computing power in this network is cost-prohibitive. The network is decentralized, miners can be anonymous or pseudonymous, so there is no other way for the hackers to manipulate the network anyway, so double-spending is ruled out.
When quantum computing is commercialized and computers far more powerful than today’s’ ones are created, then the hackers may entertain hopes to hack the Bitcoin network. However, with today’s computing technology, it can’t be hacked.
Proof of work vs proof of stake: How is proof of stake algorithm different?
You can see the blockchain network is really safe with POW algorithm, however, such high security also comes at a high cost. I will explain this cost before I describe how the proof of stake algorithm is different.
POW algorithm requires every node to participate in the transaction validation, and this creates scalability issues in the network. The scalability reduces the more the network grows because now even more nodes will need to participate to validate a transaction.
The need to solve ever more complex mathematical puzzle reduces the transaction throughput. The Bitcoin users want their transactions to be included in the very next available block, and they pay fees to the miners for this. With the puzzle growing in complexity, the competition to include transactions in the next available block intensifies. The fees increase as a result.
Blockchain was supposed to be completely decentralized. However, the ever-increasing complexity of the cryptographic puzzle makes it hard for the miners to continuously upgrade their hardware and foot the growing energy bill.
Mining pools have emerged to achieve economy of scale, and Bitcoin mining is becoming increasingly centralized with giant mining rigs operated by centralized companies at an industrial scale. This is indirectly centralizing the network.
Before 2018 ends, the Bitcoin mining operations in Iceland will consume more electricity than the entire domestic consumption in the country. A mathematical money without the backing of tangible asset expending this level of energy with the concomitant strain on the environment is attracting negative media coverage.
What is proof of stake algorithm? In this consensus mechanism, there are a few nodes that stake their own cryptocurrencies for transaction validation. They are called ‘stakers’ and stakers are identified using a deterministic process.
The more the amount of stake and the longer the duration of the stake, the more likely the staker will be chosen for the transaction validation. All nodes needn’t participate in the transaction validation, and there is no complex cryptographical puzzle to solve.
All coins have already been created and there is no mining. The transaction validation process is called ‘forging’ in PoS algorithm.
This improves scalability and transaction throughput. Unlike Bitcoin network where the miners may not even hold any Bitcoin themselves, the stakers hold cryptocurrencies themselves and stake some of it, hence they have ‘skin in the game’. The stakers get the transaction fee as their reward.
PoS is a relatively new algorithm. DASH cryptocurrency project is a prominent one to use it in their network.
PoS algorithm also allows implementation of sharding to improve scalability and transaction throughput. Sharding is a database management concept where separate partitions of the database are stored in separate server instances, thus improving performance.
In blockchain, it means that horizontal portions of the network will be maintained by separate groups of nodes. No node can see the entire blockchain network, hence participation of all nodes in the transaction validation isn’t possible. Hence, implementation of sharding in blockchain requires PoS algorithm where each shard will have its’ stakers.
Ethereum proof of stake transition: Limitations of PoS algorithm and how the Ethereum project team will address them
While PoS algorithm improves scalability and transaction throughput, it’s less secure than POW, which deters the hackers due to its heavy computing power requirements.
In case of PoS algorithm, a staker can stake a very large number of coins for a very long duration, and get a high number of transactions for validation. The staker can then willfully validate wrong transactions.
However, the demand-supply equation of free market economy provides a cushion against this threat. A rogue staker will need to first buy a very large number of coins before staking them, and such massive buying will push the price of the coin up significantly, thus making it cost-prohibitive for the rogue staker.
However, the Ethereum project team working on their planned transition to the PoS algorithm has come up with another solution. They are working on a new protocol for this transition, named ‘Casper’.
In this protocol there’s a security deposit needed, i.e. a staker must deposit a minimum amount to be considered for transaction validation at all. Any manipulative behavior on part of the staker will result in forfeiting this deposit. The staker can also be banned permanently.
Proof of stake vs. proof of work: Which one will be the consensus algorithm of the future?
While POW is widely tested and makes the blockchain network fully secured, it’s also impacting scalability and transaction throughout adversely. POW mining is increasingly controlled by centralized companies, and the energy cost isn’t sustainable.
While the PoS algorithm provides less security, the stakers have their own cryptocurrencies at stake, hence the security is still reasonable. The network also has higher scalability and transaction throughput.
A lot depends on the successful transition of the Ethereum proof of stake transition. If such a famous network can switch to PoS and still demonstrate the security of their network with the help of the new Casper protocol, it will assure the larger blockchain-crypto community about the strength of the comparatively new PoS algorithm.
Download Our Project Specification Template
Latest posts by Aran Davies (see all)
- How to Develop a Wedding Planning App? - November 18, 2018
- Software Documentation: 6 Best Practices That Work - November 17, 2018
- How to Build a Vacation Rental Website Like Airbnb? - November 16, 2018