What Is A Consensus Algorithm?
The beauty of cryptocurrencies are that they are decentralized. One of the largest issues that arises from being decentralized is how do you determine what the next transactions to add to the ledger should be. Consensus algorithms are the answer to the problem and create a set of rules for determining how blocks (i.e. transactions) are added to the blockchain. Historically, there have been two major algorithms… proof of work (POW) and proof of stake (POS). That said, there are a multitide of up-and-coming algorithms attempting to break into the mainstream.
Types of Consensus Algorithms
Proof of Work (POW)
The Simple Explaination
A proof of work algorithm requires the use of computational power to attempt to solve a mathematical problem and whomever provides an acceptable solution first is provided a reward and their block is added to the ledger. Therefore, the more computational power you have, the greater chance of winning a reward you have.
The Detailed Explaination
Cryptocurrencies use a hash function which only provide a single output for each input. If you change the input even slightly, the output will be altered. The goal of miners is to find the input that outputs a hash solution with the appropriate number of leading zeros. In order to manage how often a solution is found, the cryptocurrency sets a difficulty which determines the number of leading zeros required in the solution in order for it to be accepted.
For example, Bitcoin block 600,000 was solved with a hash which had 19 leading zeros while Bitcoin block 300,000 was solved with a hash which had 16 leading zeros. Therefore, block 300,000 was easier to solve and required less computational power.
- Computational Power (ASICs or Graphics Cards)
Problems with Proof of Work
- Electricity Usage: This problem is two-fold… (1) the electricity usage of the computational power is bad for the environment & (2) in order to pay their electric bills, miners typically sell some of the cryptocurrency proceeds putting downward pressure on the price of the cryptocurrency.
- Hardware Requirement: In order to have computational power, a miner must purchase hardware which is costly and places a strain on the supply chain of that item (for example, graphics cards)
Proof of Stake (POS)
Proof of Stake was created as a solution to the electricity problem of Proof of Work (POW). A proof of stake algorithm requires proof of owning a stake in the cryptocurrency in order to very transactions and add them to the ledger. Therefore, the more coins you own of the underlying cryptocurrency, the greater change of winning a reward you have.
- Ownership of the underlying cryptocurrency
Proof of Space (& Time)
A proof of space (& time) algorithm requires miners to keep space on hard drives open and free. A cryptocurrency like Chia requires farmers to ‘seed’ their hard drive space with cryptographic numbers (i.e. lottery tickets). Once the blockchain broadcasts the next challenge, farmers check their cryptographic numbers to see if they have the winning ticket. Importantly, there is a delay between each challenge issued by the blockchain in order to ensure sequential completion of blocks.
- Storage space (typically high capacity HDD)
Questions? Let us know in the comments section below!