Avalanche is a breakthrough in consensus

To wash away any skepticism from the very beginning i want to start off quoting Zaki Manian who calls Avalanche the “last breakthrough in consensus algorithms”

If you have been involved in crypto there is good chance you have seen the triangle below known as the blockchain scaling trilemma

Blockchain Scaling Trilemma

Many alternative blockchain implementations since Bitcoin showed us that it is very hard for any blockchain to improve across all 3 axises. Usually an improvement in scalability comes with a sacrifice in either security or decentralization(or both). Although these terms are somewhat vague I consider this trilemma as a good enough summary to make sense of the scalability war we have been witnessing in blockchain space since 2014.

Limitations of Consensus Protocol Families

  1. Classical

Many of the alternative blockchain implementations who can achieve better scalability compared to Bitcoin-Ethereum fit into this consensus family. Classical consensus protocols (HotStuff, Tendermint, PBFT) achieve higher throughput and lower latency than Nakamoto consensus(Bitcoin, Ethereum). These protocols are basically bound by two following limitations:

a. Requirement on accurate knowledge of participants -> Consensus requires some percentage of all votes which inevitably means all validators need to have knowledge on how many validators participate in the system at any given time. Therefore entry to & exits from the validator set must be regulated. This results in higher “skin in the game” requirements (higher stakes, harsher slashing conditions due to inreponsive/malicious behaviour) which increase the overall security budget, cause barrier to entry and weaken accessibility.

b. Quadratic communication overhead -> All validators need to speak to all other validators to reach consensus. This means the message communication that needs to take place increases quadratically with number of validators. It’s very hard for the validator set to grow over to 100 nodes without impacting latency. All to all communication, limits decentralization and arguably weakens security of the system.

2. Nakamoto

Nakamoto consensus (longest chain) is extreemly robust and secure. Although we have only 10 years of research history on Nakamoto consensus and I think all experts in the field are aware of the inherent limitations of this technology at layer 1.

A screen shot from Emin Gun Sirer’s presentation

High Level Overview of Avalanche Consensus

Avalanche is a new consensus family inspired by gossip protocols. However unlike in gossip where the goal is to get the message out there as fast as you can, the goal of Avalanche consensus family is to make sure all validators in system come to an agreement on a final irreversible decision.

Rather than a technical deep dive on numbers I will i try to address what makes Avalanche consensus very innovative.

At the heart of Avalanche lies an innovative decision making process called sub sampled repeated voting. When a validator hears a new transaction he randomly selects few other validators and asks for their vote. Simplifying the exact query, we can say that the vote indicates whether transaction should be accepted or rejected. Validators who are initially unbiased switch their vote to match the supermajority decision they receive from the query and keep doing the same thing over and over again multiple rounds until they receive the same result enough consecutive times to build the necessary confidence that the vote will not be reverted and will match with the rest of all votes.

The process can be visualized in below illustrations where orange and blue colors represent binary votes made by independent validators in this simplified example and each square represent rounds in chronological order.

Visualization of sub sampled voting process from Ted Yin’s Demo

In both cases (whether the decision is blue or orange) we see that with each round, validators gain more and more confidence that their individual vote matches with the global view and the whole network comes into final irreversible decision. Note that in the sub sampled voting mechanism there are some configurable system parameters in play:

n-> number of participants

k -> sample size (how many random validators will be queried in each round)

α-> quorum size (supermajority threshold; we want α of k to switch our vote)

β -> decision threshold (how many same consecutive votes are needed to reach finality)

Each parameter change the liveness and safety guarantees of the consensus. In this interactive demo which is developed by you can pretend to be a malicious attacker and see it for yourself if you can prevent the network to reach finality in different safety and liveness conditions. Try it, it’s actually pretty cool! -> https://tedyin.com/archive/snow-bft-demo/#/snow .It is developed by Ted Yin, the first author of the “HotStuff” algorithm paper used by Facebook’s Diem.

Advantages of Avalanche Consensus

There are some strong advantages of this consensus algorithm which may not be evident at first glance.

  1. Sub-second finality at scale
Logarithmic Growth

Unlike in classical protocols where validators perform all to all communication, Avalanche validators simply interact with randomly sampled set of validators they query in each round. The number of rounds required to hold the same safety guarantees grows only logarithmically with the number of participants and the number of communication messages per validator remains constant. This results in a manageable overall communication overhead at scale and therefore a sustainable sub-second finality. When the use case of a network is value transfer the importance of fast finality can not be understated.

A Non-Doge Tweet From Elon Musk

2. High throughput

Many solutions have been proposed by alternative blockchain implementations to achieve high throughputs which either come with their inherent tradeoffs or overlook other limitations. Some of these are classical consensus (decentralization tradeoff due to limitation on validator set), client side batching (a latency tradeoff), ditching BFT (security tradeoff), sharding (latency tradeoff due to with cross shard communication), outrageous claims on tps by counting only below average size transactions or ignoring inherent inefficiency of local database (straight cheating)

Testnet bechmarks of Avalanche are very impressive and are achieved in layer 1 without above mentionned sacrifices/tricks

QA in Ava Labs Support

3. High Decentralization (aka. Censorship Resistance) at scale

The protocol is leaderless and each validator is a completely independent decision-maker. Validators don’t have to hold a global view and only interact with few other randomly sampled peers at a local level. They can permissionlessly enter and leave the system. All of these result in extreemly low barriers of entry and support high decentralization. Avalanche is run by 850 validators as of today.

4. Security With Low Budget

Although Avalanche is not as robust as Nakamoto consensus (that level of security shouldn’t be any blockchain’s goal at this point) Avalanche has some interesting security protections. Avalanche can exercise strong resilience against collusion attacks. Contrary to classical consensuses where the probability of a safety failure immediately jumps from 0% to 100% when byzantine share increase from 33% to 34%, in Avalanche safety weakens gradually in presence of a network collusions.

While Avalanche can/could have used PoW as a sybil control mechanism it prefers to use PoS where nodes stake some amount of AVAX and get queried by other validators at a frequency proportional to the size of their stake. PoS is easier to be bootstrapped and is a more accessible mechanism.

Practically once a significant economy is bootstrapped on top of a chain it becomes really unlikely to pull an economically rational attack on the network simply because of self-referring costs associated with it. In a highly decentralized network, malicious network collusion becomes very unlikely.

Avalanche leverages this by following a zero-slashing policy. If a validator is not responsive or acts maliciously he simply doesn’t receive any reward but in no case his stake gets slashed. Given the fact that in theory validator set can grow infinitely, I find this approach a smart way to provide cost efficient security. Riskless staking allows lower staking rewards which means low/negative inflation rate. Take a look this post for more info on AVAX tokenomics -> https://medium.com/avalanche-hub/why-avalanche-avax-has-the-potential-to-be-an-incredible-store-of-value-8ef6e68cbb60


  1. Liveness

Although Avalanche guarantees liveness for non-conflicting transactions it doesn’t guarantee liveness for conflicting transactions. Conflicting transactions can take different meanings depending on the business logic of the application in place. For example in UTXO type applications where UTXO’s can only be consumed in their entirety, conflicting transaction refers to double spent UTXOs. Note that in such an application, a transaction of an honest node can’t conflict with a transaction of a dishonest node. In other words, only the same owner can attempt a double spent which guarantees that it’s either an accidental situation or the node is byzantine. Avalanche assumes the latter. While Bitcoin guarantees liveness regardless of transaction set, Avalanche doesn’t guarantee that a double spent UTXO will be processed, putting all the responsibility on the shoulders of the byzantine node which is not a bad trade off after all.

“The goal of Avalanche is to make sure with very high probability that “(i) No two correct nodes will accept conflicting transactions (ii) any transaction issued by a correct client (aka virtuous transaction) will eventually be accepted by every correct node.”

2. Accountability

Classical and Nakamoto protocols are highly accountable network. In case of a blockchain fork there is a way to determine liability. Afaik, the answer to whether Avalanche can provide accountability in case of a network partition is unknown.

Multi-Chain Vision

I’ve written this post to focus on Avalanche consensus protocol but I need to also mention the vision of the Avalanche community will i find appealing.

Narratives are the thorch of cryptospace. One thing I’ve noticed recently is how un-popular “ghost-chain” narrative has become. The upcoming launch of IBC, growing layer1 economies (Terra, Algorand, Avalanche…), rumours of Diem launching in Q1 2021, increasing EVM implementations on top of various networking/consensus layers, more cross chain bridges, zones/parachains/sidechains and even Eth2.0 all signal me the comeback of multi-chain narrative stronger than ever before. With so many ETH killers it’s really hard to think otherwise.

ETH Killers

I believe crypto will enter into a decade long “Multi-chain” era which is a vision initially set forth and developed by Polkadot and Cosmos ecosystems and now strongly supported by Avalanche as well. Differences and similarities of Avalanches, Cosmos and Polkadot are further explained here

In the grand scheme of things, Avalanche is a platform of multi networks/chains. Similar to Cosmos & Polkadot, Avalanche recognizes the need for different self-sovereign networks/chains that obey different rule sets and count on different validators. This is very different from one size fits all approach we currently see in Ethereum where governance in application layer is inevitably dependent on governance in network & consensus layers. Avalanche team wants to create a suitable environment for creation of app specific blockchains/tokens with improved flexibility, customized security and consuming resources (ie: transaction fees) independent from one another.


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store