crypto.bi

ELI5 What is the Avalanche Protocol? [AVAX]

Avalanche is a next generation, post-Nakamoto consensus mechanism which was designed to incorporate the best features of previously existing protocols and add some of its own.

Note: Avalanche is both the name of a consensus mechanism and the name of the DeFi platform that was built on top of it. Today, the term Avalanche refers to the project as a whole : consensus mechanism, subnets, all the software developed for it along with the Ava Labs’ brand. In this article we discuss the Avalanche consensus mechanism.

If you’ve read the Avalanche consensus protocol paper, then you may have found some difficult to understand like metastability, Byzantine adversaries, leaderless Byzantine fault tolerance, among others.

Here I’ll try to summarize, in very simple terms, what Avalanche is and how it may push the state of the art in cryptocurrency development.

First, a short review of consensus mechanisms.

Consensus Mechanisms

Reaching consensus is a difficult task, whatever the context may be.

What will your family do on Sunday? Go fishing or watch a baseball game at the stadium? The way this is usually decided is by polling everyone and requesting their opinion. This is a simple consensus-seeking procedure because we assume everyone lives in the same house and can communicate instantly and clearly.

Other consensus mechanisms may involve more serious issues, like medical decisions, financial decisions and so on.

But, what if you need to reach consensus with people far away, whom you may not even trust? It turns out this is a very complicated problem to solve and no easy solution exists.

Classic Consensus

For participants who we know and trust, there’s something we call Classic Consensus. This works for systems administered by a single institution, where management is trusted. In Classic Consensus everyone talks to everyone else and information is exchanged until everyone is in sync with the latest available data. Thus, consensus is reached when everyone has updated.

Nakamoto Consensus

The next kind of consensus, of course our favorite kind, is Satoshi Nakamoto’s creation: Nakamoto consensus.

In Nakamoto Consensus systems, players don’t need to trust each other, they don’t need to know each other and there’s no central management. Anyone can join the Bitcoin network and start participating, regardless of physical location or affiliation with anyone else in the network. But Nakamoto consensus is slow (takes up to 1hr to confirm a TX) and has low throughput (~7 TX per second max).

A third family of consensus protocols was introduced during the first half of 2018 by an anonymous person, or group of persons, going by the name Team Rocket.

This new family of protocols was dubbed Snow.

Snow to Avalanche

Team Rocket published a paper in which they described the Snow family of consensus protocols. This paper was titled Snow to Avalanche because it shows how the Snow family of consensus protocols leads to the Avalanche system.

Basically, this new family of protocols does not depend on miners (Nakamoto consensus) or on all nodes talking to each other (classic consensus).

It’s a completely new family of protocols which achieves extremely high throughput (1000’s of TX’s per second), high scalability and very fast finality (how fast TX’s are completed).

Simplicity

Avalanche, AVAX for short, is a simple protocol. It does not require advanced mathematical concepts in order to be fully understood.

AVA uses a gossip protocol strategy, also known as an epidemic protocol. The reason it’s called that way is the way consensus spreads throughout the network. One node randomly queries a certain number of nodes around it. The queried nodes are chosen randomly as to not allow premeditated foul play.

Nodes then respond to the query. The host which started the process then computes which alternative was the most popular among replies. It then adds its own weight to that reply. When other nodes query it, its reply will propagate forward including its own weight. Every node repeats this process in an avalanche of sorts.

This system presents very little chance of developing a tie. In fact, there’s an extremely small chance of landing on a 50/50 situation. It always tilts towards one preferred choice which ends up becoming the consensus.

It’s a quiescent system: no mining, no special ecosystem of miners is required to keep the system going. All that’s required is for nodes to participate on the network. It’s also very lightweight system, which can be run on inexpensive hardware.

Metastability

Metastability is the central idea in Avalanche protocol.

It’s a new concept in cryptocurrency development, so newbies often ask what metastability is, exactly.

Metastability is a situation where the network is not fully stable. It’s like a sphere that’s balancing itself on top of a hill.

Diagram of a ball placed in an unstable equilibrium. Made with Mathematica 12
Author: OrdinaryArtery CC BY-SA 4.0

Anything can change the state of this system. The sphere can freely roll one way or the other at any time.

The way metastability works on the Avalanche protocol is by randomly querying nearby nodes for gossip about a certain situation. The information received automatically tilts the system towards one of the sides and the sphere rolls.

The sphere is the status of a transaction. It’s going to end up on one of the sides and that’s where our consensus is.

This system can tolerate a large fraction of Byzantine participants, or adversarial nodes. If nodes lie about the consensus, it doesn’t really matter because the majority will have tilted the system towards the correct side. Like all other consensus mechanisms, it depends on having an honest majority.

So, what if someone creates lots of fake personas just to tilt the consensus to their advantage? That’s what we call a Sybil attack.

Sybil Deterrence

AVA protects itself against Sybil attacks by attaching a cost in order to participate in the gossip trade.

Each node that participates must prove to own some stake in the system.

This stake is represented by AVAX tokens.

These tokens will have some financial value and a minimum amount of AVAX will be required in order for nodes to pass gossip to other nodes. This way, in order to defraud the system, a large financial sum would be required. As in Nakamoto consensus protocols, Game Theory guarantees that players would rather invest in a legit way rather than risk losing their stake in the system by trying to cheat.

Conflicting Transactions

Avalanche protocol does have a small drawback: it allows users to attempt to double spend.

The protocol does not offer any guarantee against conflicting transactions. So a rogue user could send the same transaction twice, at the same time, to try and double spend.

But, ironically, this can only affect sender of money, not the whole network!

The cheater will send the same TX twice and the network will begin querying each other about that TX.  At some point in the future, eventually everyone will reach a consensus about two TX’s having the same origin. Everyone will either discard one or the other as invalid and the sender will not know which one got invalidated, resulting in him being unable to know if his payment got through or not. In fact, it’s a part of meta-stability that, since he sent out two dubious transactions, that they’ll never get 100% confirmed. The fraud is forever uncertain.

The source of the money gets lost, for all practical purposes, and nobody gets credited for it! The cheater has essentially cheated himself, since his UTXO has been spent but he doesn’t know when or where.

Governance

Finally, Avalanche will offer on-chain governance.

The system will include a mechanism to allow stakeholders to modify system parameters without forking the network or having to agree on changes by miner signaling.

Interest rate will also be adjusted via on-chain governance, allowing stakeholders to vote using their AVAX stake.

It’ll be a crowdoracle model for economic decisions, which will sidestep central planning. This contrasts with the Bitcoin model where developers who control the Git reposiory actually control governance.

In Avalanche, stakeholders vote using on-chain parameters. Everything is decentralized and decided by the holders of AVAX tokens whose votes have a weight proportional to the size of their stake.

Conclusion

I hope this introduction to Avalanche has given you a better idea of how this innovative protocol works.

It is a very simple protocol that uses randomized gossip in order to reach a consensus.

Its core idea is metastability, where the network remains unstable on purpose, allowing consensus to tilt either way very easily, thus making it very improbable that there’ll be a 50/50 tie for any decision problem.

Emin Gun Sirer of Cornell University is leading the development of Avalanche, based on the ideas introduced by Team Rocket in 2018.

References

How do I begin staking AVAX?

Summary of cryptocurrency consensus mechanisms

Snowflake to Avalanche: A Novel Metastable Consensus Protocol Family for Cryptocurrencies

Avalanche Consensus Protocol Summary

Team Rocket: 0x8a5d2d32e68bc50036e4d086044617fe4a0a0296b274999ba568ea92da46d533

Avalanche Image Credit: Wikimedia Commons

About the Author
Published by Crypto Bill - Bill is a writer, geek, crypto-curious polyheurist, a dog's best friend and coffee addict. Information security expert, encryption software with interests in P2P networking, decentralized applications (dApps), smart contracts and crypto based payment solutions. Learn More About Us