Bitcoin, consensus and PoW vs PoS
2023-01-06
At the request of our readers, we are focusing a little more on the undisputed king of cryptocurrency.
"One coin to rule them all"
Happy 14th Anniversary Bitcoin! A financial revolution that was born in the wake of the 2008 financial crisis.
On Saturday January 3rd 2009 at about 13:15 the first block was created and you might think that block 1 came about 10 minutes later but it wasn't until a full six days later that block 1 was created and exactly why that happened is unknown none but Satoshi Nakamoto himself but there is no shortage of theories. Block 0 also referred to as the "Genesis block" was hardcoded into the software from the beginning to create an official starting point for the chain that can also be validated by all nodes as block 0 has no input from the previous block and precisely because of this hardcoding it works never to spend the 50 BTC that block 0 contains. Satoshi Nakamoto has been praised for his creation by users of the network sending "tips" to the address in question over the years and it contains at the time of writing a whopping 68.56 BTC worth SEK 12.33 million in today's value.
14 years is very impressive for a technology and an idea that the mainstream media has declared dead a whopping 466 times according to watchguru and if you break it out in 14 years it is an average of every 10 days, which can feel a bit overdramatized considering that the knowledge and use is increasing more or less constantly and since a couple of years back we have also started to see how countries have declared Bitcoin as "Legal tender" and we also see over the years how increasingly large companies and organizations integrate bitcoin into their operations so it is extremely doubtful that not impossible to say that development will stop in 2023 even though Bitcoin will be declared dead 36 times during that time according to the average.
With Ethereum moving to Proof of Stake (PoS) from Proof of Work (PoW), it may be appropriate to have a little insight into two of the most common and by far the most popular consensus mechanisms today to see how they work.
What then is a consensus mechanism?
Wikipedia explains the term as "an agreement between a group of people where consensus refers to the agreement itself".
It is precisely this agreement that makes a blockchain work in a secure way and makes it reliable while avoiding problems such as "double spend", which means that the same transaction is carried out twice. The consensus mechanism enables an "authorityless" network architecture so that verified data can flow freely and securely between the participating nodes, one might say, and here the concept of BFT (Byzantine Fault Tolerance) also comes into play. BFT is something used in both PoW and PoS and refers to the "Byzantine Generals Problem". The metaphor describes how a number of generals in different geographical areas plan an attack and need to communicate with each other to coordinate the attack. How then does each general know that none of the other parties are reneging on their agreement and creating false messages to mislead the others? A decentralized network that does not have a central authority can never work if the participating nodes cannot trust that the information they receive is correct even if they do not trust the others.
Proof of work (PoW) which is the most production tested of the two methods and is also the oldest as it became popular with the birth of the world's first cryptocurrency Bitcoin which applied the algorithm. Proof of Work simply means that miners in the network "work" to find a solution to a puzzle through "trial and error". A miner first guesses a solution and then checks to see if it can be correct, sort of like building a really huge puzzle upside down, then flipping it over to see if the design turned out to be correct. It can take an extremely long time for a single miner to find the correct solution to the puzzle, and you therefore join together in large data centers where all nodes collaborate in "pools" with their total computing power (Hashpower) to find a solution. A block with the associated puzzle takes approx. 10 minutes (Block time) to solve and you adjust the time using the degree of difficulty. The level of difficulty means that you can adjust the puzzle if it starts to be too easy to solve. You make it bigger and more difficult if the blocks are solved faster than the 10 minutes specified and the opposite if it starts to take too long to solve the blocks and the degree of difficulty is regulated approximately every two weeks.
When a node solves a puzzle, it immediately presents the solution to the other nodes in the network, who in turn check whether the solution is correct. When the nodes have reached consensus (agreed) that the solution is correct, the block is added to the existing block chain and our miners begin the work of finding the solution to the next block. If two or more valid solutions are presented at the same time, they can form groupings of nodes that think differently. This is called a temporary "fork". What happens then is that the grouping that first finds subsequent blocks with the help of its miners "wins". Their chain will be the one that has had the most PoW work done on it and as soon as the other groupings realize this, they too will switch chains to the "longest". These forks are rarely longer than 2-3 blocks and that is why many people wait 2-3 blocks to consider a transaction confirmed by the blockchain.
PoW is a very energy-intensive method due to all these calculations, but that is also what makes it so safe and stable. Bitcoin is backed by the work and energy required to keep the network up and running, which in an environmentally conscious society where saving energy has a large media focus can easily lead to an incorrect image of Bitcoin's energy use. One often forgets how much electricity the financial institutions use today compared to Bitcoin for a much more substandard financial system that is also very exclusionary. It is precisely the energy that makes Bitcoin so valuable as the chain has been allowed to grow for a long time and increased enormously in hash power, which has made it more or less impossible to "hack". The total power and energy that would be required from the outside to disrupt the network is in all likelihood uncollectible. The incentive for someone who would succeed in amassing enough power to disrupt the network is instead to use that power properly. It is only if you follow the rules of the game that the remaining nodes in the network will accept the blocks you produce. An actor who tries to disrupt the network or prevent transactions from entering the blockchain would likely be blacklisted and ignored and then all the energy this actor expends is in vain.
The PoS consensus method involves having "locked" (Stake) coins in your wallet to validate blocks and mint new coins instead of mining. If you lock 10% of the total amount of coins in your wallet, you will also receive 10% of the reward. Often you need to lock a minimum amount to be able to participate, which has made it possible for you, similar to mining pools, to join forces with other actors to be able to get as much input as possible to have as a stake in the network. Since there are no calculations to perform in the same way as PoW, it also does not draw as much energy. However, PoS is a method that is not perceived as as safe and secure as PoW as it has not had time to be tested in reality in the same way as Proof of Work. PoS is also a method that can be much more easily exposed to a 51% attack as it requires possession of coins instead of hashpower, which is also considered by some to be more centralizing.
The debate about which method is best will continue for many years to come, but I believe that only Bitcoin will be the established protocol with PoW in the future as it is precisely that function that makes the currency so valuable and secure today. An important aspect that is often forgotten in the debate is that given the electrification of the entire society today, innovation and a new way of thinking about the energy issue is required. Man is developing solutions to problems and new methods of clean energy are on the horizon. In the same way that the economic crisis in 2008 gave birth to Bitcoin, the energy crisis will change the way we create energy, which we have already seen in 2022 when every single home owner or housing association looked at solar cells. You can compare it a bit to when the computer games for a long time drove the development of computers because the games required more power than the computer could deliver, which ultimately led to the creation of the graphics cards.
The future simply looks bright!