Lesson 6: Blockchain Consensus Mechanisms
After completing this lesson, you will be able to:
Explain what a blockchain consensus mechanism is
Understand the relationship between consensus mechanisms and mining
Name the two most widely used consensus mechanisms
Understand why consensus mechanisms are important in a decentralized distributed database
Understand why the Bitcoin consensus mechanism persists despite the public outcry.
Welcome to the sixth lesson in Kriptomat Academy’s Blockchain Fundamentals course. In this lesson, we’ll explore how blockchain consensus mechanisms work.
Consensus mechanisms ensure cryptocurrency transactions are valid before they are added to the blockchain database.
- Consensus mechanisms validate transactions by ensuring that the sender has enough coins or tokens to complete the transaction.
- Block construction is part of the consensus mechanism. Blocks hold records of blockchain transactions and ensure that past transactions have not been erased or altered.
- For many blockchains, consensus mechanisms are responsible for the ongoing creation of new coins and tokens.
- Consensus mechanisms are the final stage of approving a transaction. No funds are transferred until the consensus mechanism is complete and the block is written to the blockchain.
The two most widely used consensus mechanisms are proof-of-work and proof-of-stake
- Bitcoin uses a proof-of-work mechanism that rewards validating nodes by issuing them Bitcoins every time a block is written to the Bitcoin blockchain. This process is known as mining.
- Proof-of-stake blockchains funnel rewards to random stakeholders, with those who have staked more of the blockchain’s coins or tokens having a higher chance of being selected. When a number of other nodes validate the stakeholder’s block, it is added to the blockchain and the stakeholder receives a reward based on the transaction fees for all the transactions in the block.
- Other blockchain consensus mechanisms include delegated proof of stake, proof of importance, proof of capacity, proof of elapsed time, proof of activity, proof of burn, proof of authority, Byzantine fault tolerance, practical Byzantine fault tolerance, delegated Byzantine fault tolerance, and federated Byzantine agreement. Look for explanations of these mechanisms in the “Deep Dive” version of this course.
Consensus mechanisms play several essential roles in the blockchain world
- The primary goal of consensus mechanisms is to make it safe to do business with people you don’t know or trust. Consensus mechanisms support trustless transactions without a trusted middleman by allowing blockchains to make sure people don’t spend the same crypto twice or buy things without paying for them. They do this by judging which recent transactions are valid and which are not – without requiring human judgment.
- Consensus mechanisms also validate transactions and build blocks so validated transaction data can be stored on the blockchain.
- With proof-of-work blockchains, consensus mechanisms are necessary for the creation of new coins, which are awarded to the winning node.
- Consensus mechanisms help ensure that all the nodes on a blockchain network are synchronized with valid, up-to-date copies of the transaction ledger.
Bitcoin’s proof-of-work consensus mechanism has come under fire in recent years
- Bitcoin miners are said to use about as much electricity validating Bitcoin transactions as the entire country of Sweden.
- Proof of work is slow, too. Bitcoin is limited to validating about seven transactions per second worldwide – compared to the Visa credit card network’s speed of 24,000 tps.
- In 2022, Ethereum changed from a proof of work mechanism to proof of stake, an algorithm that uses much less electricity and is potentially much faster.
Bitcoin mining is big business
- Solving the crypto puzzle to be Bitcoin’s validator earns miners so much money that they have created a market for custom computer chips that are optimized for Bitcoin mining and nothing else. Arrays of hundreds or thousands of these computers are installed at Bitcoin farms, usually in locations where electricity is inexpensive.
- Mining was profitable for individual users in the early days of crypto, but today individual users can’t expect their computers to outperform the combined efforts of thousands of custom-designed computers.
- This is economical because the reward for being selected as the miner of a block of Bitcoin data is currently 6.25 Bitcoins – about 120,000 euros, even at January 2023’s reduced Bitcoin prices.
Mining Bitcoin is just too lucrative to give up
- A new block is validated every 10 minutes, on average. That’s more than 17 million euros per day awarded to miners.
- Individual miners on PCs used to validate blocks and earn Bitcoin rewards, but these days big mining farms validate almost all blocks.
- The reward for mining Bitcoin is cut in half after 210,000 blocks are validated. That is roughly once every four years. This event is known as “halving,” and it generally has little or no effect on Bitcoin prices.
So – what have we learned?
- Proof of work and proof of stake are the two most widely used consensus mechanisms, but there are many more.
- No funds are transferred until the block of transactions is appended to the blockchain database.
- Consensus mechanisms make it safe to do business with people you don’t know or trust, eliminating the need for intermediaries like banks and investment houses.
That’s the end of this lesson! Test your understanding and earn points toward a Kriptomat Academy certificate of achievement by taking the test!
Kriptomat Academy content is informative in nature and should not be considered a personalised or any other investment recommendations or advice.