Inside the blockchain developer’s mind: Proof-of-stake blockchain consensus

Cointelegraph is following the development of an entirely new blockchain from startup to mainnet and beyond through its Inside the Blockchain Developer's Mind series. In previous parts, Andrew Levine Koinos Group discussed some of the challenges The team has grappled with ever since identifying the key issues they seek to solve and outlining three of the "crises" that are holding back blockchain adoption: updatability, scalability Y governance. This series focuses on the consensus algorithm: Part 1 is about proof of work, Part 2 is about proof of stake and Part 3 is about burn test.

This article is the second in my series on consensus algorithms, in which I leverage my unique perspective to help the reader gain a deeper understanding of this often misunderstood concept. In the first article in the series, I explored proof-of-work (the OG consensus algorithm), and in this article, I'll explore proof-of-stake.

As I explained in the last article, from a game theory perspective, blockchains are a game in which players compete to validate transactions by grouping them into blocks that match the transaction blocks that other players are creating. Cryptography is used to hide the data that would allow these people to cheat, and then a random process is used to distribute digital tokens to people who follow the rules and produce blocks that match the blocks sent by other people. These blocks are then chained together to create a verifiable record of all the transactions that took place on the network.

When people produce new blocks with different transactions in them, we call it a "fork", because the chain now forks in two different directions, and what ensures that everyone updates their database to match is how they are punished when no.

The real innovation in Bitcoin (BTC) was the creation of an elegant system to combine cryptography with economics to take advantage of electronic currencies (now called "cryptocurrencies") to use incentives to solve problems that algorithms alone cannot solve. People were forced to do mindless work in the mine blocks, but safety is not derived from the performance of the work, but from the knowledge that this work could not have been accomplished without the sacrifice of capital. If not, the system would not have any economic component.

The work is verifiable attorney for capital sacrificed. Because the network has no means to "understand" the money that is external to it, it was necessary to implement a system that would convert the external incentive (fiat currency) into something that the network can understand: hashes. The more hashes an account creates, the more capital it must have sacrificed and the more incentivized it is to produce blocks at the correct fork.

Since these people have already spent their money to acquire hardware and run it to produce blocks, their incentive punishment is easy because they have already been punished! They spent their money, so if they want to keep churning out blocks on the wrong chain, that's fine. They will not get any rewards and they will not get their money back. They will have sacrificed that money for nothing. Your blocks will not be accepted by the network. Y they will not earn any tokens.

This proof-of-work system ensures that the only way for someone who doesn't want to follow the rules (aka a malicious actor) is to acquire and run more hardware than everyone else combined (that is, mounting a 51% attack) . This is the elegance behind proof of work. The system cannot function without sacrificing increasing amounts of capital. However, the proof-of-stake operates in a fundamentally different way that has important theoretical consequences for the game.

Related: Proof of Stake vs. Proof of Work: Differences Explained

Proof of stake

Proof of Stake (PoS) was the first proposed in 2011 by Bitcointalk forum member QuantumMechanic as a less expensive alternative (for the miner) to proof of work:

“I wonder if as bitcoins become more widely distributed, if a transition from a proof-of-work-based system to a proof-of-stake system could occur. What I mean by proof of stake is that instead of weighing your 'vote' on the transaction history accepted by the share of computing resources that you bring to the network, it is weighted by how many bitcoins you can show that you own, using your keys. "

Rather than forcing block producers to sacrifice capital to acquire and run hardware in order to gain the ability to earn block rewards, in proof-of-stake, token holders only need to sacrifice the liquidity of your capital to earn block rewards. People who already have a network's token can earn even more from that token if they give up the right to transfer those tokens for a period of time.

This is an attractive offer for people who are used to sacrificing money to buy and run hardware in order to earn bulk rewards. Proof of work is great for cryptocurrency startup, but once that phase is over, holders of this valuable currency are forced to exchange the fruits of their labor, that valuable currency, for an external currency (often, the fiat currency they are apparently competing with) to buy capital and power equipment just to maintain their system.

Related: Proof of Stake vs. Proof of Work: Which is more 'fair'?

Proof-of-stake is great for allowing these folks to increase their profit margins while keeping them in control of the network. The problem is that it decreases the security of the network because the malicious actor no longer needs to sacrifice their money on a large amount of hardware and execute it to mount an attack. The attacker only needs to acquire 51% of the platform's base currency and stake it to take control of the network.

To thwart this attack, PoS systems must implement additional systems to "trim" block rewards from a validator that has produced irreversible blocks in a "losing" chain ("trim conditions"). The idea is that if someone acquires 49% of the token supply and uses that stake to produce blocks on a losing fork, they will lose their tokens staked on the main chain.

These are complicated systems designed to "win back" bulk rewards from user accounts, adding to the computational overhead of the network while raising legitimate ethical concerns ("Is it my money if it can be cut?"). They also only work if the attacker fails to acquire 51% of the token supply. This is especially problematic in a world with centralized exchanges that feature custodial participation. This means that it is entirely possible for an exchange to control more than 51% of a given token supply without incurring any risk, which represents the cost of an attack. de minimis. In fact, this has already happened in recent history on one of the most widely used blockchains in the world, at one time valued at nearly $ 2 billion: Steem.

An excellent history of that event can be found. here. The important details for our purposes, according to that account, are that funds held by three exchanges were successfully used to acquire 51% control of a major blockchain. Taking the most charitable perspective of all participants, it simply "cost" all of these entities very little to take control of the chain because they had acquired large stakes at very low cost. In fact, centralized exchanges are literally paid out rack up big bets because their purpose is to function as centralized custodians of tokens.

Related: How the Steem saga exposes the dangers of group gambling

Implementing these trim conditions is by no means trivial, which is why so many proof-of-stake projects like Solana have been launched, by their own admission, with centralized solutions in place and why so many other projects (like ETH 2.0) are taking so much time consuming to implement PoS. The typical solution is to give a foundation a large enough stake that it is the only one with the power to determine who is a malicious actor and cut its rewards.

In short, proof of work is good for driving decentralization, but it is inefficient. Proof-of-stake is good for lowering the operating costs of a decentralized network relative to proof-of-work, but it further entrenches miners, requires complex and ethically questionable cutoff conditions, and does not prevent "swap attacks."

What I will discuss in my next post is the hypothetical question of whether there is a “best of both worlds” solution that offers decentralization and proof-of-work security with the efficiency of proof-of-stake. So stay tuned!

The views, thoughts and opinions expressed here are those of the author alone and do not necessarily reflect or represent the views and opinions of Cointelegraph.

Andrew Levine is the CEO of Koinos Group, a team of industry veterans accelerating decentralization through accessible blockchain technology. Its core product is Koinos, a free and infinitely upgradeable blockchain with universal language support.