You may have heard that cryptocurrencies like Bitcoin uses enormous amounts of electricity to secure their networks, but why is that? And more importantly, what are the alternatives?
Mining new coins takes a lot of computing power because of the proof of work algorithm, the idea was first introduced in 1993 to combat spam emails and was formally called proof of work in 1997. However the technique went largely unused until Satoshi Nakamoto created Bitcoin in 2009. He realized that this mechanism could be used to reach consensus between many nodes on a network and he used it as a way to secure the Bitcoin blockchain.
However, the proof of work algorithm works by having all nodes solve a cryptographic puzzle.
This puzzle is solved by miners, and the first one to find a solution gets the miner reward. This has led to a situation where people are building larger and larger mining farms like this one.
According to Digiconomist, Bitcoin miners alone uses about 54 TWh of electricity, enough to power 5 million households in the US or even power the entire country of New Zealand or Hungary. But it doesn’t stop there. Proof of work gives more rewards to people with better and more equipment. The higher your hash rate is, the higher the chance that you’ll get to create the next block and receive the mining reward.
To increase chances even further, miners have come together in what’s called “mining pools.” They combine their hashing power and distribute the rewards evenly across everyone in the pool. So to sum it up: proof of work is causing miners to use massive amounts electricity, and it encourages the use of mining pools which makes the blockchain more centralized as opposed to decentralized.
So to solve these issues we have to find a new consensus algorithm that is as effective or better than proof of work. In 2011, a forum user called QuantumMechanic proposed a technique that he called “proof of stake.” The basic idea is that letting everyone compete against each other with mining is just wasteful. Instead, proof of stake uses an election process in which 1 node is randomly chosen to validate the next block.
Oh yeah, small difference in terminology there. Proof of stake has no miners, but instead has “validators,” and it doesn’t let people “mine” blocks but instead “mint,” or “forge,” new blocks. Validators aren’t chosen completely randomly. To become a validator, a node has to deposit a certain amount of coins into the network as stake.
You can think of this as a security deposit. The size of the stake determines the chances of a validator to be chosen to forge the next block. It’s a linear correlation.
Let’s say Bob deposits $100 dollars into the network, while Alice deposits $1000. Alice now has 10 times higher chance of being chosen to forge the next block. This might not seem fair because it favors the rich, but in reality, it’s more fair compared to proof of work. With proof of work, rich people can enjoy the power of economies at scale. The price they pay for mining equipment and electricity doesn’t go up in a linear fashion. Instead, the more they buy, the better prices they can get. But back to proof of stake.
If a node is chosen to validate the next block, he’ll check if all the transactions within it are indeed valid. If everything checks out, the node signs off on the block and adds it to the blockchain. As a reward, the node receives the fees that are associated with each transaction inside this lock.
Okay but how can we trust other validators on the network? Well that’s where the stake comes in. Validators will lose a part of their stake if they approve fraudulent transactions. As long as the stake is higher than what the validator gets from the transaction fees, we can trust them to correctly do their job. Because if not, they lose more money than they’ll gain. It’s a financial motivator and holds up as long as the stake is higher than the sum of all the transaction fees.
If a node stops being a validator, his stake plus all the transaction fees that he got, will be released after a certain period of time. Not straight away, because the network still needs to be able to punish you, should they discover that some of your blocks were actually fraudulent.
So the differences between proof of work and proof of stake are quite significant. Proof of stake doesn’t let everyone mine for new blocks and therefor uses considerably less energy. It’s also more decentralized. How is that? Well, in proof of work we have something called mining pools. Those are people who are teaming up to increase their chances of mining a new block and thus collecting the reward. However, these pools now control large portions of the Bitcoin blockchain. They centralize the mining process and that could be very dangerous. If the three biggest mining pools were to merge together, they would have a majority stake in the network and could start approving fraudulent transactions.
Another important advantage is that setting up a node for a proof of stake based blockchain is a lot less expensive compared to a proof of work based one. You don’t need expensive mining equipment and thus proof of stake encourages more people to setup a node, making the network more decentralized and also more secure. But even proof of stake isn’t perfect, and it also has some flaws.
Now you might think, “hold on a minute! If I buy a majority stake in the network, I can effectively control it and approve fake transactions.” This is called the 51% attack and was it was first discussed as a weak point of the proof of work algorithm. If a single miner or a group of miners can obtain 51% of the hashing power, they can effectively control the blockchain. Proof of stake on the other hand makes this attack very impractical, depending on the value of a cryptocurrency.
If Bitcoin were to be converted to proof of stake, acquiring 51% of all the coins would set you back a whopping $79 billion dollars. So the 51% attack is actually less likely to happen with proof of stake. But that’s not the only risk. Proof of stake algorithms also have to be careful how they select the next validator, it can’t be completely random because the size of the stake has to be factored in. But at the same time, the stake alone isn’t enough because that will favor rich people, who will get chosen more frequently, will collect more transaction fees, become even richer and thus increase their chances of being chosen as a validator even further.
There are a number of proposals to fix this, like coin age based selection for instance. Another potential problem is when the network choses the next validator but he doesn’t turn up to do his job. This could easily be solved by choosing a large number of backup validators as a fallback. In short: proof of stake brings additional risks when compared to proof of work and a lot of research is needed to understand these risks and to mitigate them.
Now that you know what proof of stake is, what benefits it has and what risks are involved, let’s take a look at real world usage. A few cryptocurrencies are using it right now, but more cryptocurrencies are likely to follow in the future. Ethereum for instance is working on implementing a proof of stake system which they call Casper. It’s currently deployed on the Ethereum testnet and is actively being developed.