proof of stake proof of work proof of work vs proof of stake staking

Proof of Work vs Proof of Stake: A Detailed Comparison

Written By Ivan on Tech

Aug 14, 2020

The “proof of work vs proof of stake” debate has been raging for a long time. Many modern projects have opted from proof of stake (POS) over the more traditional proof of work (POW). Your old school currencies like Bitcoin, Zcash, and Ethereum (pre 2.0) were all based on POW. So, in this article, let’s learn more about POW and POS. But first, let’s look into what we mean by consensus algorithms.

Proof of work vs proof of stake - What are consensus algorithms?

Consensus is a method with which a group can reach an agreement dynamically without causing any discord in the group. As such, it's a lot more positive than simple voting, which doesn’t care about the minority's feelings. A mechanism that allows you to reach consensus is known as a “consensus algorithm.” There six rules that consensus algorithms must follow:

  • It should give a result.
  • It must create a spirit of collaboration.
  • The participants must put the interests of the group before their own individual needs.
  • The votes of each participant should carry equal weightage.
  • The process should be as inclusive as possible. No participant should feel excluded.
  • Participants should actively take part in the process.

Proof of work vs proof of stake  - What is the Byzantine Generals Problem?

A consensus mechanism can only work in a decentralized system if they manage to answer the Byzantine generals problem. To understand how this problem works, consider this scenario. There are a bunch of generals surrounding this heavily fortified castle. There are two conditions that you need to keep in mind about this scenario:

  • These generals are pretty far apart, making direct communication next to impossible. 
  • The castle in the center is heavily fortified, meaning that only a coordinated attack can take it down.

So, how do the generals join hands to transfer messages? They employ a messenger. Now, this is where we hit our roadblock. This system has the following weak points:

  • A corrupt general can pass along an incorrect message, making the whole system go haywire.
  • The messenger himself may be corrupt.

As you can see, this has some clear references to the blockchain, as well. The chain is a decentralized ecosystem, wherein you don’t have a centralized body directing the ebb and flow of the system. Let’s face it, the only way that you can transfer 2 BTC to your friend is if the majority of the nodes in the network update their ledger records, right?

So, how do we ensure this honesty without having to trust the conscience of the people involved?

The answer to this question lies in Nakamoto consensus.

Nakamoto Consensus

This style of consensus algorithm is named after Satoshi Nakamoto - the anonymous creator of the Bitcoin protocol. This is the style of consensus that's widely used in modern decentralized ecosystems.

Now, having said that, let's look at the main requirements of this school of consensus algorithms:

  • It must efficiently deal with a WAN (wide area network). 
  • It should be able to deal with the double-spending problem. This means that the same digital token can't be spent more than once. This isn't a problem that's prevalent in physical cash. However, the token is a digital file that can be simply duplicated or falsified.
  • More than 2/3rd of the network should be able to validate the transactions or operations properly.

Having said that, what is it about Nakamoto consensus that sets them apart from your "normal" consensus algorithms?

Well, Nakamoto consensus has a particular value called "difficulty." This difficulty is a work or resource that the network participant must stake or spend. So, how does this difficulty help?

  • Block validation. Since they have some form of skin-in-the-game, you can safely assume that they will be validating the blocks honestly.
  • It controls the number of tokens that are presently circulating within the ecosystem. As such, it caps the overall supply.
  • It makes the entire system very secure.

While this article is about proof of work vs proof of stake, this is one of the many commonalities between the two. Both POW and POS are Nakamoto consensus mechanisms.

What is proof of work?

The proof-of-work (POW) algorithm was created by Satoshi Nakamoto to bring consensus into the Bitcoin ecosystem. Since then, many coins have started utilizing their version of POW.

First, let’s look at how POW will help solve the Byzantine Generals problem.

Suppose all the generals meet beforehand and decide that they will only accept messages, which when hashed begins with a particular number of 0s. Let’s say that they agree to send messages when hashed, starts with four zeroes.

Now a general wants to send a message which says “ATTACK IN AN HOUR,” these are the steps that he will need to follow:

  • First, he will attach a nonce to his message. The nonce can be any random hexadecimal combination.
  • He will then hashed the message to see if the hash begins with the required number of 0s.
  • If he fails, then he will keep changing the nonce and checking the hash until he is successful.

What is proof of work – Conditions of success

  • The process of finding the nonce to get the target hash should be extraordinarily time-consuming and exhausting on your processor.
  • The process of checking whether the nonce and message combine to give a specific hash should be easy.

Upon achieving the correct hash, the general transmits the value of the hash, nonce, and message to everyone. Anyone can easily combine the nonce with the message and hash it to check if the required conditions (number of 0s) are met. Network participants can easily check the validity of the transaction.

The only option that the corrupt generals have is to find another message and nonce combination, which, when hashed, will give a hash with the required number of zeros. Even if they do find one, the message will already be transmitted to every other general, which will deem their attempt useless.

Now, let’s bring POW from a hypothetical use-case to practicality.

What is proof of work method?

So, how does mining work with respect to proof-of-work? It is quite similar to the processes that our generals had to go through. Before anything happens, the Bitcoin ecosystem agrees on a difficulty value. Now the steps look like this:

  • The miner hashes the block.
  • They attach a nonce in front of the hash.
  • They hash the combination again.
  • This is where difficulty comes in. Remember the hash we got in the previous step. If the resultant hash is less than the difficulty, then the mining is deemed successful and the miner broadcasts the block, nonce, and hash across the network.
  • The network can check to see if the values are correct or not. If yes, then the miner gets the block reward.

The main advantage of POW is the amount of security it brings into the system. Miners need to spend a real-world resource, aka their computing power, which can get really expensive. It is not in the best interest of the miners to go against the system since they can incur huge losses.

Proof of work vs proof of stake – Disadvantages of POW

  • POW 's innate architecture ensures that its an immensely wasteful process. Bitcoin, the poster boy of POW algorithms, eats up more energy than the entire nation of Switzerland, according to estimates published by researchers at the University of Cambridge
  • Its an inherently non-scalable process. As such, it can't possibly host applications that may bring in hundreds of thousands of users.
  • While Bitcoin is definitely very secure, other chains may not be as secure due to the lack of activity. Ethereum Classic and Bitcoin Gold are proof of work cryptocurrency examples that have been shackled by 51% attacks.
  • Wealthy companies can buy a whole stock of mining equipment and increase their hashrate within the system. If they gain 51% of the hashrate, they will be able to control the network and render it useless.

What is proof of work cryptocurrency examples

  • Bitcoin.
  • Bitcoin Cash.
  • Ethereum.
  • Ethereum Classic.
  • Bitcoin Gold.
  • Zcash.

What is Proof of Stake?

While proof of work uses a real-world resource, proof of stake makes the entire mining/validating process completely virtual. So, how does proof of stake work?

  • Network validators can participate in POS by locking up some of their coins as a stake within the system.
  • The block validation process happens by placing bets on blocks that are likely to be added to the blockchain. 
  • When the block gets added to the chain, the validator gets a reward that's proportional to their bets. In simple terms, the higher the bet, the higher the rewards.

What is Proof of stake alternative?

The process we have explained above is your simplistic Nakamoto consensus version of the POS algorithm. We have many different schools of POS like DPOS and Ouroborous that are currently used by various projects like EOS, Tron, FLETA, TOP Network, and Cardano.

However, we go any further, let’s look into leader-based consensus algorithms,

Leader-Based Consensus

As cryptocurrencies became more mainstream, and more people entered the market, it quickly became apparent that traditional Nakamoto consensus was not cutting it. The third-generation blockchains like EOS, Cardano, etc. needed something more scalable and faster to aid their transactions. This is why they moved on to leader-based consensus mechanisms.

So, what is a leader based consensus mechanism?

  • The entire network selects certain nodes via an election process. 
  • These nodes become the leaders of the network.
  • The leaders take care of the security and the consensus within the ecosystem.

EOS with delegated proof-of-stake, Cardano with Ouroborous, are both examples of systems using the leader-based consensus mechanism. Let’s take a closer look at EOS’s delegated proof of stake.

Delegated Proof of Stake (DPOS)

The DPOS in EOS as formulated by CTO Dan Larimer. Previously, we saw exactly how does proof of stake work. However, that system involved the entire network in the consensus process. 

  • 21 block producers are chosen from the network. 
  • A pseudorandom is derived from the block time, based on which the producers have shuffled around.
  • Each block producer needs to validate at least one block ever 24 hours. If they fail to do so, then they are removed from consideration. 
  • Validation only requires 2/3rd of the block producers (aka 15 out of 21) instead of 2/3rd of the entire network.

The main advantage of a leader-based consensus system is scalability. They are extremely fast. EOS has a block time or <3 seconds while Ethereum has a 15 second block time and Bitcoin 10 mins.

The main disadvantage is that since only a small number of people are in-charge of consensus and security, they are more centralized than Nakamoto-consensus using cryptos like Bitcoin and Ethereum.

So, what are the advantages of POS?

  • POS is significantly more resource-friendly than POW. POW forces you to waste real-world computational resources. The worst part is that it promotes wastage for the sake of wastage. In POS everything that you are doing is virtual and requires no resource spending. As such, it prevents the possibility of a 51% attack and helps the network be more scalable.
  • POS is considered a significantly more scalable tactic than POW due to its inherent design.

Proof of work vs proof of stake – Disadvantages of POS

The main disadvantage of POS is the nothing-at-stake attack. To understand what we mean by that, consider the image below. So, we have the main chain that’s navy blue and a branch (pink). 

The question here is, what’s stopping a validator from voting on both the main chain and the branch? Malicious validators could focus solely on the pink chain and force the network to hard fork.

POW mitigates this issue simply since it requires a tremendous amount of power to work. So if a malicious miner does mine on the pink chain, they will need to continue mining to overtake the mainchain. The likelihood of this happening is very low and extremely expensive. It makes no sense for a miner to waste so many resources on a block that will be rejected by the network anyway. Hence chain splits are avoided in a proof of work system because of the amount of money that the attacker will have to waste.

However, wastage on POS is not even an issue. You can simply validate blocks on both the chains with impunity. No matter what happens, you will always win and have nothing to lose, despite how malicious your actions may be.

How does proof of stake work around this problem?

Different projects are working around this issue with various innovations. Case in point, Ethereum mitigates this problem by using the Casper protocol. Casper has a slashing mechanism which instantly slashes your stake if you act maliciously. Then we have mechanisms like absolute proof of stake that look at your behavior history and accordingly give you the privilege to validate blocks in the ecosystem.

What is proof of stake cryptocurrency example?

  • EOS
  • Tron
  • Cardano
  • Dash
  • Ethereum 2.0
  • TOP Network
  • Tezos

Proof of work vs proof of stake

 

Proof of work

Proof of stake

Method

Use mining equipment to solve cryptographically hard puzzles and append the block to the main chain.

Lock up a stake in the network and bet on blocks. Receive rewards proportional to your bet.

Resource

Real-world computational power

The user’s stake

Incentive

MIners incentivized to sell tokens to buy better mining equipment.

Validators incentivized to hold on to their tokens and add more to their stake.

Scalability

Less scalable

More scalable

Proof of work vs proof of stake: Conclusion

Proof of work and proof of stake are the two most popular consensus mechanisms in the space. We hope that you were able to gain a clearer perspective on this topic. In this guide, we looked into the following topics:

  • What is proof of work?
  • What is proof of stake?
  • Proof of work vs proof of stake - the differences and the similarities.
  • Proof of stake and proof of work cryptocurrency lists.

Do you want to learn more?

Do you want to learn more about cryptocurrencies and their internal mechanisms?

If yes, then come on over and check out our blockchain courses at Ivan on Tech Academy. The courses have been created and curated by some of the most respected experts in the industry. Join us soon!



Like what you're reading?

Get to work in a fast growing industry. Start learning blockchain together with our 20,000+ students today.
Use coupon code BLOG20 for 20% off.

Become Blockchain Certified Today No Prior Knowledge Needed!
Close

Get our Free Ebook

Enter your email and we will send it to you!