Reaching Consensus: Eth2.0 vs Tendermint
There is no ‘best’ design for consensus or a blockchain; but rather, that network design is a series of trade-offs to engineer targeted outcomes.
The publication of the Bitcoin Whitepaper by Satoshi Nakamoto in 2008 marked the birth of the Web3 movement, which has grown at an exponential rate since. Satoshi’s original vision relied on a consensus mechanism known as Proof of Work (PoW), where multiple entities can contribute to managing a database (decentralized ledger) but is resistant to control by any one entity. PoW has been adopted by many crypto projects, including Ethereum, which launched in 2016. While PoW is a breakthrough innovation in the area of mechanism design and distributed systems research, the most common critique is that it requires a massive amount of energy — some estimating that the Bitcoin network in 2021 used more electricity than the country of Denmark.
To address this, researchers began exploring another consensus mechanism that has become known as Proof of Stake (PoS). While there have been many flavors of PoS that have proliferated in Web3 over the last few years, the two most prominent are Tendermint PoS — developed by Jae Kwon as part of the Cosmos vision of interoperable blockchains, and Casper — developed by Vitalik Buterin and Virgil Griffith of the Ethereum foundation. Casper is an integral part of The Merge, one of the most anticipated events in Web3 history. The Merge will mark the transition of Ethereum from PoW to PoS, which will reduce the energy consumption of the chain by 99.95%. In this article, we’ll dive into some of the basics of PoS and how Ethereum PoS compares to Tendermint in regards to finality, distribution of stake and validator requirements.
We hope that this article will illuminate the fact that there is no ‘best’ design for consensus or a blockchain; but rather, that network design is a series of trade-offs to engineer targeted outcomes.
Proof of Stake Basics
Proof of Stake is a consensus mechanism model that relies on a set of independent validators — computers that run identical code operated by individuals or entities — to come to an agreement on the authenticity and order of a specific set of messages that will be appended to a blockchain. The central idea is that if a majority of validators agree to a specific set of messages, then no one specific validator can override the network. In order to achieve this, a PoS network must define a set of rules by which consensus is achieved and a set of incentives to reward validators who work in an honest, consistent fashion and punish those who do not. These incentives only work if each validator has some kind of financial ‘stake’ in the system; each validator must ‘stake’ (i.e. lock) a certain amount of capital (typically the native token of the blockchain). That ‘stake’ can increase or decrease depending on the quality of the validation services. The way these incentives are designed and the manner in which validators come to consensus with each other affects almost every aspect of a blockchain network and the applications that are built on top of it. Below we’ll discuss three aspects related to Tendermint PoS and Ethereum PoS — finality, distribution/decentralization of a blockchain and validator requirements. We will see that these aspects are interconnected, which makes blockchain design as interesting as it is nuanced.
Finality on a Blockchain
Due to their decentralized nature, blockchains are considered to be ‘ledgers of truth’ — there is no one entity that can change the data on a blockchain once the data has been finalized. But how does finality happen? One of the properties of Tendermint PoS is that it enforces fast finality. This means that every new block of data that is added to the blockchain is considered ‘final’ — i.e. no revisions can be made, no roll-back of the chain is permitted without specific intervention from governance or other mechanisms. Tendermint achieves this via a multi-round voting system where validators first vote for whether a new block proposal is valid or invalid. When ⅔ of the validators’ voting power (voting power is determined by amount of financial stake) agrees on the block proposal, this is known as ‘the polka’. Voting then moves to the second stage where validators vote to commit a new block to the blockchain. If ⅔ of the validator voting power votes to commit the new block, then the block is added to the blockchain, and the new block is considered to be finalized.
On the Cosmos Hub, the first production-ready blockchain built on Tendermint, the time to create new blocks is on average 6–7 seconds. Newer blockchains built on Tendermint, like Evmos, can create new blocks in as little as 2 seconds. Due to fast finality, anyone is able to utilize the data on a Tendermint-based blockchain in real-time. For example, two fast finality chains can utilize IBC (Inter-Blockchain Communication) to communicate in real-time, which is only possible because of this fast finality property. IBC enables new features like Interchain Security, which allows for one blockchain to rent security from another blockchain. IBC also enables features like Interchain Accounts, which allows an account on one blockchain to control an account on another blockchain; Interchain Queries enables one blockchain to leverage the data on another blockchain. This is all possible because of the property of fast finality, which is one of the hallmarks of Tendermint.
Given the benefits of fast finality, one may be surprised to know that Ethereum PoS does not have this property. Where the Tendermint protocol attempts to find ⅔ consensus on a block by block basis, Ethereum PoS targets consensus on an epoch-by-epoch basis — each epoch in Ethereum PoS is a collection of 32 blocks.
At the beginning of each epoch, 32 validators are assigned to one of the 32 slots. These 32 validators then propose blocks in sequential order and once the 32 slots are filled, the entire epoch is voted on by the complete validator set of Ethereum. If ⅔ of the validators vote that the epoch is valid, then that epoch is considered to be ‘justified,’ and a new epoch will be initiated. Once the newest epoch is justified, then the previous epoch is considered to be ‘finalized’ — shown below as LFE (last finalized epoch). Since it takes roughly 10–12 seconds for a new block to be created on Ethereum, it will take over 10 minutes for any specific block to be considered ‘finalized’. Check this out to see Ethereum’s block production in real time.
One might ask why did Ethereum make a design decision where the network does not have fast finality? The answer lies in the fact that the Cosmos Ecosystem and Ethereum are optimizing for different goals. The Cosmos Ecosystem aims to create an interoperable system of blockchains and fast finality is needed to realize this vision. In contrast, Ethereum aims to become the censorship-resistant global settlement layer. Since finality takes time on Ethereum, it allows for validators to organize or reorganize blocks within a specific epoch in order to maintain safe block production. Another necessary property of a network that aims to be a global settlement layer is that of maximum decentralization. Ethereum PoS attempts to achieve decentralization via distribution of stake and low validator requirements, both of which are discussed below.
Distribution of Stake
In most PoS networks, the amount of tokens staked to a specific validator is directly related to its voting power. As we can see below (as of 9/5/22), the top 7 validators for the Cosmos Hub control over 33% of the network voting power.
Since at least 66% percent of the staked voting power is required to create new blocks, this means that the top 7 validators could, in theory, collude to halt the network. The number of validators required to collude to halt a network is known as the Nakamoto Coefficient. The term, popularized by Balaji Srinivasan, is one measure of decentralization of a blockchain. A higher Nakamoto Coefficient suggests a more decentralized network. The stake in most Tendermint-based chains tends to exhibit a power law distribution; for example, the top 10 validators (seen above) control 45% of the voting power of the network while the bottom 10 validators (seen below) control just 0.31% of the voting power.
Ethereum PoS works in a slightly different manner in the sense that each validator’s voting power is capped at 32 ETH. Given that there is currently over 13MM ETH staked, the voting power of each validator is just .00024% of the whole voting power of the network. By capping the amount of voting power that a specific validator has, it limits the amount of control any one specific validator has on the network and forces stake to be distributed across a wide set of validators. Ethereum’s PoS chain currently has over 420,000 validators contributing to the network, whereas a typical Tendermint-based chain has anywhere from 50–175 validators. So, does this mean that Ethereum PoS is more decentralized than the Cosmos Hub? The answer is not as cut and dry as the numbers given above.
Take Coinbase as an example of a cryptocurrency exchange that also offers validation services for PoS networks. They are currently the top validator by voting power on the Cosmos Hub, with 6.97% of the network voting power. Coinbase is also validating Ethereum’s PoS network, and if they were to run just one validator, like they do for Cosmos Hub, that one validator would have a much smaller percent voting power in comparison. In order to better service their customers (and internal treasury), Coinbase has created nearly 60,000 validators for Ethereum PoS, which currently accounts for nearly 14% of the voting power on Ethereum. So even though there is an effective cap to the amount of ETH a validator has, this doesn’t prevent larger institutions from controlling a large stake of a network. For a network that aims to be censorship-resistant and withstand attack vectors from nation-states and regulators, having one entity control more than 10% of the voting power is not ideal. So while Ethereum does have over 400,000 validators, the top 10 entities — Coinbase, Kraken, Binance, Staked.us, Whale 0x5d7, Bitcoin Suisse, Stakefish, Rocket pool, Figment and Celsius Network — control over 42% of the network’s voting power. When thinking about decentralization of a PoS blockchain, it’s important to consider the definition of PoS provided above — a network of independent validators that come to a consensus on the authenticity and order of messages. For Ethereum to be successful as a censorship-resistant global settlement layer, it will be critical to have a large number of widely distributed independent validators with a flatter distribution of voting power.
Given that large entities can easily create a large number of validators and retain significant voting power, does that mean that having a cap on the voting power of an individual validator does not serve to decentralize a network? While it might be easy to say ‘yes’, it’s important to look at validator requirements as well.
One of the tenets that Vitalk, the founder of Ethereum, believes is that in order for a PoS system to be maximally decentralized, a layperson should be able to validate a blockchain and verify its data from their home. As a result, the recommended specifications for a machine running an Eth2 validator is an Intel Core i7–4770 processor, 8GB RAM and 100GB of storage. For comparison sake, a 2019 Macbook Pro, has an Intel Core i7 processor, 16GB of RAM, 512 GB of storage and is currently listed at $1100. Additionally, the punishment for downtime (a validator being off-line) is much lower than other PoS networks such that under normal conditions, a validator on Ethereum PoS can be profitable while only having uptime of around 50%, which is very doable with a home set-up. The other requirement mentioned above is 32 ETH, which is currently valued at around $48,000. While the effective cap of 32 ETH may be ineffective in distributing stake away from larger entities, it is a consistent number that any “layperson” knows will not change in the near future. Given these validator requirements, validation services is not something that requires professionals or organizations, which is a mark of decentralization in itself.
Contrast that with the requirements to validate the Cosmos Hub. Some estimate that it can cost a few thousands dollars a month, and co-location to a data center may be necessary to guarantee close to 100% uptime. Also, up to $60k of staked ATOM is currently needed to break into the active validator set, which is a number that may fluctuate depending on market dynamics. As new features get added to the Cosmos SDK, such as Interchain Security, validators may be required to reserve compute resources in order to be able to provision for more blockspace. These heavier validation requirements are in line with the Cosmos vision of creating an interoperable network of blockchains with high uptime and fast finality. But by making validation expensive and technically complex, it may lead to a centralization of validation services, only possible for a select few.
How Does Saga Fit In?
Saga will be utilizing Tendermint PoS as its consensus algorithm and will be one of the first chains to utilize Interchain Security. Because some validators may be required to provision resources for hundreds of connected blockchains or be able to provision blockspace in short order, the validator requirements will be much higher for Saga than most other Tendermint chains, let alone requirements on Ethereum PoS. In addition, Saga’s token economics will have incentive structures designed to keep the price of blockspace low and require validators to engage in auctions to receive rewards. In other words, Saga will likely be run by validators who have professional experience in offering validation services, which will allow us to contribute to the Cosmos vision on interoperable blockchains.
While Saga will rely on Tendermint for consensus, we will utilize the EVM (Ethereum Virtual Machine) for execution. To date, the EVM is the most popular smart-contract platform in Web3 and has been used by many other popular blockchains like Avalanche, Polygon, Binance Smart Chain and Celo to name a few. Saga will be the next in line.
Part of the reason blockchain networks choose to utilize the EVM is the vast developer mindshare and the extensive developer tools available. Truffle, Ganache and Remix IDE make it easier to prototype, develop, test and deploy applications built on the EVM. Wallet integrations through Metamask, API access through Infura and front-end libraries like Drizzle help developers to create a more user-friendly experience. Developers building on Saga will be able to utilize these extensive developer tools to build their own application but will have access to something that is not found on any other EVM blockchains — dedicated blockspace. Unlike other EVM chains where thousands of applications compete for limited blockspace, Saga developers can access dedicated blockspace for their dApp that is free of congestion from other applications. In addition, because Saga will be utilizing Tendermint consensus, dApp developers can also utilize IBC and the host of features like secure token transfer, interchain accounts, interchain queries and synchronous composability with other applications.
As the Merge happens in the next few days, and Etheruem moves from Proof of Work to Proof of Stake, it marks an important milestone for the Web3 industry as a whole and further legitimizes PoS as a consensus methodology. There are many flavors of PoS, which can be optimized to achieve specific goals. Ethereum PoS is optimized to become a censorship-resistant global settlement layer, and Tendermint is optimized to serve as a bedrock for the Cosmos ecosystem of interoperable blockchains. It’s our hope that both Cosmos and Ethereum are successful in reaching their respective goals.
Interesting Articles to Read