Coinsights #16: Avalanche, the AWS of Web3
Welcome back to Coinsights!
Today I’ll be talking about Avalanche and why it’s so much more than just another top blockchain. In particular, I’ll analyze the revolutionary Avalanche consensus protocol, the biggest breakthrough in consensus algorithms since the one published in the Bitcoin whitepaper.
Excited? Let’s get started.
Avalanche is a Platform
Various blockchains are designed to do different things and therefore have different strengths and weaknesses. For example, Solana can support up to 65k transactions per second with the expectation that each transaction is fairly small. DeSo is built for social applications and can store image data on-chain, but can’t process nearly as many transactions per second as Solana. Size and speed are just two axes when it comes to comparing blockchains; others include security, decentralization, and fees per transaction.
The barrier to entry in creating a new blockchain is incredibly high. Some of the obstacles people face when developing a new blockchain include finding validators, running security checks, and performing many other necessary but largely cookie-cutter tasks. This upfront time investment often kills projects before developers get to start designing the features they set out to build in the first place (e.g., custom smart contracts).
Enter Avalanche.
What AWS does for web2, Avalanche does for web3. AWS provides easy to use cloud solutions for developers so they can avoid rack mounting servers in their garage and eventually punching holes in their walls:
So what’s the web3 version? Avalanche provides the lower level “common” blockchain infrastructure* (such as consensus, networking, and security) by default so that developers can focus on what makes their projects special. This idea of composability, while not unique to web3, is incredibly powerful in that it enables people to build on top of others’ work and rapidly accelerates innovation.
*One important distinction between AWS and Avalanche is that the latter provides this infrastructure in a decentralized way. More on this later!
The Primary Network
Avalanche calls a group of one or more blockchains a subnet. The main subnet of the Avalanche platform is the Primary Network, which is broken up into the Exchange (X), Platform (P), and Contract (C) Chains, each of which serve a separate purpose on the platform:
The X chain is specifically designed to send and receive $AVAX, Avalanche’s native currency.
The P chain is used by developers to build their own custom subnets.
The C chain is the default blockchain on which smart contracts are executed. Developers that don’t create a custom subnet can simply use the C chain for their applications. The C chain is the closest analogy to other L1 chains like Solana or Ethereum.
For more info on the differences between the three chains, check out this blog post.
The magic of Avalanche is that it can run any kind of smart contract on its subnets. This is how the Avalanche platform is able to support Ethereum smart contracts on the C chain or even an entirely custom smart contract language that nobody else in the world uses. It’s all the same to the Avalanche platform!
Avalanche achieves this through a shared consensus algorithm.
Past Consensus Protocols
As you know, all blockchains (and by extension their smart contracts) need a way to arrive at consensus. This is the part of Avalanche that makes it analogous to “AWS”: The Avalanche Consensus Protocol is a standardized & decentralized way to support consensus across all blockchains running on the Avalanche platform.
Before diving into the Avalanche Consensus Protocol, I’ll briefly talk about its predecessors.
Classical Permissioned Consensus
Classical permissioned consensus protocols arrive at consensus by having all validators talk to each other (for n validators, there are n * (n-1) messages). Permissioned refers to the fact that an outsider needs permission from the other members of the group to participate. This technique assumes that all members are well intentioned, and ensures that decisions can be made efficiently. However, the closed system is fundamentally at odds with web3’s inclusive mentality.
Nakamoto’s Permissionless Consensus
To better align with the open, decentralized goals of the crypto community, Bitcoin’s author Satoshi Nakamoto popularized a permissionless consensus protocol called proof-of-work. Permissionless protocols allow anybody to join as a validator, making the network decentralized.
However, this decentralization comes with the drawback of being very inefficient. Put simply, proof of work ends up wasting resources (both time and energy) by requiring many validators to do the same work at the same time. Read more about proof-of-work here!
The Avalanche Consensus Protocol
The Avalanche consensus protocol takes the best elements from both permissioned and permissionless consensus to create a system that is decentralized and efficient. To start, anyone can join as a validator, making the Avalanche network open and decentralized. Moreover, the Avalanche network supports proof-of-stake, which we covered last time:
• Since blockchains are decentralized, independent validators must work together and decide which transactions to include in the transaction log
• Validators must offer collateral (a stake) which is taken from them if they act maliciously
• Validators earn rewards for acting correctly (rewards are in the same currency of the proof-of-stake blockchain they’re helping validate)
• The larger a validator’s stake is, the more likely they are to be chosen to validate a set of transactions & therefore earn rewards.
However, as we’ve seen with Bitcoin, decentralization is just part of the criteria to become an effective blockchain. I won’t go into the exact specifics here, but Avalanche validators are empowered to parallelize the work needed to be done to approve a transaction. With parallelization comes scalability!
Finally, I mentioned earlier that Avalanche solves many problems for developers, including that of finding validators. Because every blockchain running on Avalanche uses the same consensus algorithm, the Avalanche network can share validators between blockchains! Therefore, when you stake on Avalanche you’re actually staking across a network of blockchains, which theoretically is more resilient than just staking on a single chain.
To underscore this point, say there are two separate blockchains running on Avalanche, one built for finance and the other for social.
At 9am, the demand to process transactions is likely much higher on the finance chain than on the social one, so Avalanche dynamically sends more validators to work on the finance chain.
At 8pm, the demand is likely swapped, and Avalanche can send more validators to work on the social chain instead.
This system ensures that the need for validators is constantly met across a variety of use cases in the Avalanche ecosystem.
In summary, from Seq:
Avalanche is a platform of platforms, ultimately consisting of thousands of subnets to form a heterogeneous interoperable network of many blockchains.
Avalanche Facts
I’ve talked a lot about the theory – let’s get down to the numbers. Check out this thread on Avalanche performance by CEO Emin Gün Sirer:
As measured in the Avalanche whitepaper, the Avalanche network is able to achieve throughput of 4500 TPS per subnet. In addition, Avalanche is highly scalable with throughput only decreasing by 1.4% when the number of validators increases 16 fold.
Given all of these impressive statistics, it is unsurprising that $AVAX, Avalanche’s native token, has had a meteoric rise. Its market cap (# of tokens * price of token) is ~$23B at time of writing, making it the 11th most popular cryptocurrency by that metric. Avalanche ranks second behind Ethereum on TVL, another popular metric, highlighting Avalanche’s appeal with the developer ecosystem.
Therefore:
Thanks for reading! What’d you think about this article? Should I write more about Avalanche? I’d love to hear your feedback on this < 30s Google Form.
Want to keep the discussion going? Come chat in the Coinsights Discord or find me on Twitter!
P.S. I learned about pretty much everything in this article approximately two days ago, and I’m fully bought in. I’m going to build some small projects on Avalanche, anybody want to join?