Guide: Proof of Work (PoW) vs Proof of Stake (PoS) vs Delegated Proof of Stake (DPoS)
Hi everyone. This article will cover and explain the differences between a few forms of cryptocurrency consensus, namely Proof of Work, Proof of Stake, and Delegated Proof of Stake. Cryptographic consensus schemes like these are at the heart of almost all decentralized cryptocurrencies from Bitcoin to Bitshares to even Steem.
This guide is made to be written in common crypto language—not too hard for someone who hasn't seen these concepts before, and easy to understand for those that are somewhat familiar with cryptocurrency. Let's dive in!
Proof of Work (PoW)
Proof of Work was created almost two decades ago in 1999, by Markus Jakobsson and Ari Juels. The main goal of PoW is to deter denial-of-service attacks (DDOS) by requiring (computational) work to be done before block submission. This means that, in order to mine a Bitcoin block, you have to spend/have computational power/energy.
Let's go over how Bitcoin uses Proof of Work for its mining purposes, but before that, let's define a few terms. Hashing means to take some value or string of characters and put it through a program that gives an entirely different string of characters, in a pseudo-random unpredictable way. Bitcoin uses the SHA-256 Algorithm, which is one of many hashing programs that can hash like that.
For example, the SHA-256 hash of the word "apple" is
yet the SHA-256 hash of "applf" (incrementing the 'e' to an 'f') is
These strings look super different, and that's intended—there's no quick or easy way to go from the first to the second.
When Bitcoin miners mine blocks, they pick a number of transactions in the "mempool" (a list of the transaction requests they received from Bitcoin users, and put them together in a block. After setting the block up, they add a number to the end of the block, called a nonce. Then, they put the entire block with the nonce through the SHA-256 algorithm, giving them a random string like we saw above.
Bitcoin requires the string to start with a set number of zeroes, that changes based on the computational power of miners. Let's say that number is 20. When the miner hashes the block, the miner checks the hash to see if it starts with twenty zeroes. If it doesn't, he changes the nonce (the number at the end) and hashes again, and again, until it does start with twenty zeroes.
The first miner to get the nonce right and get the block hash to start with twenty zeroes (or the number of zeroes required) "wins," and can mine the block, giving them the block reward of over $50K and all of the transaction fees users paid in the block. You can see how mining the block took a lot of work— the miner had to keep on trying different nonces until they got the one right. This took a lot of processing power, computational energy, and more.
Another important goal of PoW is to protect against double spending. What prevents Bitcoin user Alice from getting her transaction "Alice sends 2 BTC to Bob" put in the blockchain again and again and again? PoW protects the Bitcoin network from DDOS attacks, because in order to mine a block you need a sufficient amount of processing power, and in order to monopolize Bitcoin mining, you need control of a majority of the computational power of all Bitcoin miners, which is infeasible and generally impossible. Thus, it's infeasible for Alice to have the computational power to "double spend" her money, and the network is well-protected.
Proof of Stake
Proof of Stake (PoS) is another consensus structure, like PoW, but instead of requiring work or computational power, it requires the miner to hold a large amount of the cryptocurrency. Let's say cryptocurrency "Stakeproofcoin (SPC)" relies on Proof of Stake, and that Bob owns 2% of all of the SPC in existence. This means that the probability of Bob mining a proof-of-stake block is 2%.
Proof of Stake aims to prevent attacks by having high requirements for such an attack (like PoW) and by lowering incentives dramatically. In order for Bob to attack SPC, he would need to own a majority (51%, let's say) of all SPC coins, which would require a lot of money in the first place. Also, his incentive to attack is very low, since if he does attack SPC he would suffer dramatically from his own attack (because he owns so many SPC).
Some people, like Ethereum supporters, think Proof of Stake is more efficient and fair compared to Proof of Work for reasons such as the above. Additionally, anyone could become a PoS miner technically given they had some amount of the coin, however getting into Bitcoin mining generally requires expensive hardware and commitment.
Delegated Proof of Stake
Delegated Proof of Stake (DPoS) is a newer consensus structure, and is actually behind many cryptocurrencies including Steem. It's somewhat similar to PoS but has different and more "democratic" features that some say make it more efficient and fair.
Users of a DPoS crypto vote for delegates/witnesses to serve on a panel of witnesses. Lots of variables within the network such as transaction sizes and fees are controlled by this witness panel. The witness panel also (deterministically) selects witnesses to "witness" or confirm blocks. Clearly, the network and users place a lot of trust in these elected witnesses to give them such powers, yet if they misbehave, they can easily be voted out of the "witness panel," so there is really no incentive for them to misbehave or upset their voters.
To add in the "proof of stake" part of DPoS, stakeholders have influence proportional to their stake in the system. DPoS is found to be more decentralized than other consensus systems because the threshold to enter is very low. Other alternatives generally "allow" anyone to enter, but most people are excluded from entering due to high costs/needs, and generally a few pools or large miners produce all blocks on those systems.
DPoS has been shown to help maintain decentralization, fend off regulatory interference, and has made cryptos like Steem into world players. This is also why you should take your witness votes on Steem very seriously; the people you vote for are possibly the ones who will be deciding/shaping the future of the network as well. Just like a democracy, the system will work better and be more decentralized/fair if more people participate and are informed.
In conclusion, these three consensus systems are at the heart of many cryptos and exist to keep cryptocurrencies decentralized, hard to attack, and secure.
Thanks for reading,
image sources: 1: Schneider Electric, 2: Shutterstock/LinkedIn, 3: IAgreeToSee.com
knowledge sources: Steemit FAQ, Bitshares.org