An Introduction to Proof of Stake

Proof of Stake (PoS) came about in an attempt to find an energy efficient alternative to Proof of Work (PoW) mining. PoS is a hotly debated subject, and there is yet no clear standard implementation. A few of the significant players in the Proof of Stake arena are Peercoin, Ethereum’s Casper, Cardano’s Ouroborus, and Tendermint. This article aims to provide a high-level overview of some significant contributions to the PoS space.

proof-of-stake.png

Note: this article is about “pure” PoS, which should not be confused with its many variants such as DPoS, PoST, or hybrid PoS\PoW approaches. (see: Additional Resources)

PoW Primer

Before we jump into the nuts and bolts of Proof of Stake (PoS), lets briefly review Proof of Work (PoW) mining, as a reference. To put it simply, Bitcoin miners record transactions while competing to solve a cryptographic hash. A hash function is a common cryptographic method for identifying and verifying the integrity data. Once a hash is calculated for a particular piece of data, if even a decimal point were changed, the verifying hash would be entirely different than the initial identifying hash. A Bitcoin hash is made to be very difficult to solve, but once solved is easily verified. When a miner solves a Bitcoin hash, the block is sealed, and the miner is rewarded with the new coins created in the block.

Having its miners compete to solve a hash is how Bitcoin solves the problem of fairly selecting the next block-producer. A considerable benefit of PoW is that in order to double spend, alter transaction history, or censor transactions, a single entity would need control over 51% of the Bitcoin hash power. It is designed to be more profitable to mine fairly than to attack the network. To gain greater than 50% of the Bitcoin hash rate would require controlling a massive amount of specialized mining hardware that would lose value if an attack were successful. Proof of work is costly, but effective. PoW has secured Bitcoin for ten years, and is not to be trivially replaced.

cryptocurrency-miner.png

Proof of Stake

At its core, PoS is a Sybil resistance scheme depending on block producers to have a certain amount of voting power on the chain, usually determined by how much of the relevant cryptocurrency they hold. Rather than solving computational puzzles, they form consensus by voting on blocks.

Proof of stake was first discussed among the Bitcoin community in 2011. The next year, Sunny King and Scott Nadal launched the very first PoS chain. PeerCoin determines the stake of a validator by how long they have been in possession of the coins in their wallet.

There are many challenges in designing a proof of stake chain. For example, ‘Nothing at Stake’ is a classical PoS problem that since block-producers don’t tie up mining hardware in block production, they could easily maintain competing forks rather than choosing a single chain. Another problem is deciding how to randomly select validators. If the selection of block-producers were found to be predictable, that would introduce a major vulnerability to the chain. Programming assured randomness is very difficult. Another is the Long Range Attack which would allow early participants of a PoS chain to revert back to previous versions of the chain and add blocks until creating a longer chain than the present valid chain, thus replacing it.

fsl-triangle.png

Additionally, all distributed systems must address the FLP theorem. This theorem explains that any consensus system can satisfy only two of the following three properties:

  • “safety” — all nodes produce identical valid results

  • “liveness” — nodes that don’t fail always produce a result

  • “fault tolerance” — the network is able to keep working even if some nodes are faulty

Each PoS implementation aims to address these, and other challenges of consensus, in their own way.

Ethereum’s Casper

casper.png

Vitalik Buterin has been interested in PoS since it’s discussion first began among the Bitcoin community. Recently, he composed tweetstorm detailing the history of Ethereum’s research into PoS over 75 individual tweets. Ethereum proof of stake research began in January 2014, with an algorithm called Slasher that introduced the use of penalties to solve the “nothing at stake” problem.

As evidenced by Vitalik’s overview, there are many different challenges to consider when designing a PoS chain. It seems the Ethereum team is closer than ever to a design that the researchers can agree upon. However, despite the anticipation among its community, Casper won’t be going live this year, as was previously detailed in the roadmap. Ethereum developers have decided to combine their work on Sharding with that of PoS and are now designing those features together. Ethereum Foundation researcher, Justin Drake, says that it’s possible Casper will be ready sometime in 2019. A draft of Casper’s whitepaper was recently made available.

Cardano’s Ouroboros

ouroboros.png

Another closely followed, Proof of Stake project is Cardano’s Ouroboros. Cardano (ADA) is the only cryptocurrency to be founded entirely upon scientific research. The research from Cardano’s founding company IOHK unquestionably provides an invaluable service to the community.

“Ouroboros: A Provably Secure Proof-of-Stake Blockchain Protocol” was published August 21, 2017. That paper promises Ouroboros to be “the first blockchain protocol based on proof of stake with rigorous security guarantees.” The lack of rigorous security guarantees is exactly why we’re still talking about PoS on a major chain, and not experiencing it.

This May, “Ouroboros Genesis: Composable Proof-of-Stake Blockchains with Dynamic Availability” was published, observing, “none of the existing PoS-based blockchain protocols can realize the ledger functionality under dynamic availability in the same way that bitcoin does (using only the information available in the genesis block).” What’s more, while I was writing this article, IOHK released: “Ouroboros-BFT: A Simple Byzantine Fault Tolerant Consensus Protocol.”

We present a simple, deterministic protocol for ledger consensus that tolerates Byzantine faults.

The Byzantine Generals Problem, is a famous problem in computer science, from the 1980's. Its creator, Leslie Lamport, was working out how to design distributed computer systems that remain functional even if some of their components break down. He used the analogy of generals in Byzantine army who must send each other messages to communicate and reach an agreement on a battle plan. However, some of the messengers might be traitors. The problem is to find an algorithm ensuring that the generals will agree on the same battle plan. A byzantine fault is any error that would interfere with that agreement.

“Reliable computer systems must handle malfunctioning components that give conflicting information to different parts of the system.”

Cardano’s roadmap currently is at 20% (early development) for creating a public decentralized PoS testnet, and there has been no mention of a target date for launch. However, their most recent blogs, and 4/8 most recent IOHK research papers have been on PoS\Ouroboros.

shelley-test-net.png

Tendermint

Tendermint is a novel PoS consensus mechanism, initially proposed by Jae Kwon. What makes Tendermint stand out from the crowd is that it doesn’t attempt to choose a block producer at random. Instead, a block proposer is elected via a round-robin between validators so that each round one is selected to proposes a block. Each round is composed of a three-step process:

  1. A validator proposes a block.

  2. The rest of the validators signal agreement.

  3. The proposer signs and commits the block.

Once proposed, the block must be agreed to by 2/3 of the validators to become finalized. This approach avoids the vulnerability that a known block producer could be influenced, by requiring the rest of the validators to agree upon the proposed block. Tendermint prioritizes safety and finality over liveness. If there is any difficulty towards reaching consensus on a given block, the system will halt until validators reach consensus.

Summary

Over the coming years, the many variants of PoS will be put to test. For now, a vast amount of research is occurring across the crypto-sphere. Leading the pack in research are the Ethereum Foundation and IOHK. It’s reasonable to assume that any PoS innovations happening elsewhere will be filtered through those institutions of research. For instance, Tendermint has played a role in Ethereum’s Casper research since 2014.

The promise of Proof of Stake is an energy efficient future for blockchain and cryptocurrency. However, for the time being, Proof of Work retains its crown as the most secure method for reaching consensus on a public permissionless blockchain.

Note:

It was suggested that I add a part 2 to discuss other PoS contenders: Tezos and Avalanche. I would like to cover Tezos but the article was getting long, and we made a judgement call. I’m very interested in Avalanche, but its very new so I’m hesitant to write about it until the crowd has had more time to digest.

Either I’ll add some mention of Tezos here, and address Avalanche later, or I’ll try to divide the introduction to PoS and the top PoS contendors into 2 separate articles.

I’d be happy to hear any feedback, suggestions, and critique you would offer—here in the comments.

—Infominer

Additional Resources