Hey friends š
One of the reasons I started making content is that I love to learn new things. And whenever I do, I find that the best way to really make sure I understand them is to explain them to others šØāš« After all, if you canāt explain it to a beginner, do you really understand it?
Recently Iāve been looking at different blockchains and trying to figure out what draws people to them. Iāve explained why people find Bitcoin so compelling, some of the trials and tribulations I experienced when I first began experimenting on Ethereum, and of course some of the ways DeFi beginners and power-users alike can take advantage of the Polygon network.
But there is one chain Iām hearing a lot about lately. Itās one of the fastest growing DeFi ecosystems, and one that Iām particularly curious about. Iām talking, of course, about Avalanche š
According to its proponents, Avalanche is supposedly ultra fast, relatively cheap, and the most secure of all blockchains š Now, Iāve done some reading as well as some experimenting of my own, and in this article, Iām going to try to separate the hype from the reality, as well as find out just how to get started with some DeFi on the Avalanche network.
Regarding that last part: this post is brought to you through generous support of PoolTogetherās PoolGrants program and Iāll be including a video all about how to use PoolTogether v4 on Avalanche.
PoolTogether is a crypto prize-linked savings account which means that as you save, your interest is pooled together with the interest of other depositors to make prizes that anyone can win. Itās a bit like a lottery, except you never lose your deposit. And with low-cost chains like Polygon & Avalanche available, you wonāt have to worry about losing money on exorbitant gas fees ā½ļø
Check out this video to learn more š
Ā
And without further ado, letās hit the slopes ā·
What is Avalanche?
Those familiar with Ethereum, Bitcoin, and the core concepts of blockchain technology will likely have heard of the blockchain trilemma. This idea proposes that a blockchain needs to offer three elements to be successful: security, decentralization, and scalability, but in doing any two well, the third is inevitably sacrificed āļø
For example, Bitcoin is seen by many to achieve a high level of security and decentralization, yet its small block size and long confirmation time limit its scalability. As I mentioned in my post about Bitcoin, there are solutions being worked on to bring greater functionality and scalability to Bitcoin from Layer 2 solutions like the Lightning Network, to wrapping Bitcoin for use on other blockchains.
Still, some feel that Bitcoinās design itself is flawed. That the lack of smart contracts is too big of a limiting factor, and the proof-of-work system doesnāt offer sufficient decentralization under scrutiny š¬ Ethereum too suffers critiques for failing to scale to meet its immense popularity. As a smart contract platform offering near-endless programmability, Ethereum still manages to achieve a high level of security and decentralization, but even as progress is being made to scale via Layer2 solutions, many new and experienced users alike feel limited by the high cost of doing transactions on the network šø Cost is, afterall, another impediment to scalability.
How is Avalanche Different?
āWe have an in-house joke that there is no blockchain trilemmaā
ā Kevin Sekniqui, COO at Ava Labs (Wired)
In order to understand what makes Avalanche different, we first need to understand its key point of differentiation: its consensus mechanism
Coming to Consensus
Youāve likely heard the terms proof-of-work and proof-of-stake (I hope so, since I already used them in this article). And you may even have heard them referred to as consensus mechanisms, but this is actually a misnomer. In fact these are whatās known as Sybil resistance mechanisms and they are only half of the true consensus mechanism employed by a given blockchain.
Sybil resistance measures how a protocol fares against a Sybil attack. Sybil attacks are when one user or group pretends to be many users. Resistance to this type of attack is essential for a decentralized blockchain and enables miners and validators to be rewarded equally based on resources put in. Proof-of-work and proof-of-stake protect against this by making users expend a lot of energy or put up a lot of collateral. These protections are an economic deterrent to Sybil attacks.
ā Ethereum.org
The other half of this consensus couplet is whatās called the chain selection rule.
A chain selection rule is used to decide which chain is the ācorrectā chain. Ethereum and Bitcoin currently use the ālongest chainā rule, which means that whichever blockchain is the longest will be the one the rest of the nodes accept as valid and work with. For proof-of-work chains, the longest chain is determined by the chainās total cumulative proof-of-work difficulty.
The combination of proof-of-work and longest chain rule is known as āNakamoto Consensus.ā
ā Ethereum.org
Nakamoto consensus, named for Bitcoinās pseudonomous creator(s) is used by most proof-of-work blockchains including the current version of Ethereum. However, alongside the shift to proof-of-stake as part of the Ethereum 2.0 roadmap this will change to a new consensus mechanism known as Casper FFG that uses checkpoint verification for chain selection š» You can learn more in the Casper whitepaper.
Novel consensus mechanisms have been proposed, and even implemented by other blockchains. Most use proof-of-stake for sybil resistance as this appears to be the most secure option. Cardanoās Ouroboros protocol sits somewhere in the middle of these two with what it calls the local longest chain rule (see page 23 of the whitepaper) that allows for chain selection without checkpointing, albeit with a longer time to finalityāāāmore on that later.
Avalancheāāāright, thatās the focus of this article, isnāt it?āāāuses a family of consensus protocols collectively referred to as Snow āļø
Inspired by gossip algorithms, this family gains its properties through a deliberately metastable mechanism. Specifically, the system operates by repeatedly sampling the network at random, and steering correct nodes towards a common outcome.
[ā¦]
Similar to Nakamoto consensus, the Snow protocol family provides a probabilistic safety guarantee, using a tunable security parameter that can render the possibility of a consensus failure arbitrarily small.
ā Avalanche Consensus Whitepaper (page 1)
Essentially, the protocol continually polls small, random groups of validators, and combines their consensus (determined by supermajority within the group) with the consensus of other groups. This is whatās meant by āgossip.ā š¬ As the gossip spreads, confidence increases until the network consensus is finalized.
One of the key benefits of these Snow protocols are that they are not reliant on a specific Sybil resistance mechanism, though the whitepaper proposes that they align best with proof-of-stake.
Interestingly, Avalanche consensus (the combination of Snow protocols + Proof-of-stake) allows claims to provide a greater safety threshold than Ethereum or Bitcoinās 51% šŖ According to the Avalanche website this threshold is at 80%, though the Avalanche whitepaper (page 2) notes that the system ācan uphold safety (but not liveness) guaranteesā under these conditions.
Speed
Consensus is important for security and decentralization, but what matters most to the untrained user is speed and cost. Ultimately, these are both functions of throughput. Often measured in transactions per second or TPS, throughput can mean different things to different people. For example, Visa can handle tens of thousands of transactions per second, but those transsactions are not final. Each requires immense trust in Visa to make their daily, weekly, or even monthly settlements š¤
In trustless systems, we often criticize blockchains that prioritize security because slow confirmations makes them unusable in day to day life. No one wants to wait tens of minutes for a Layer 1 transaction on Ethereum or Bitcoin to finalize before they can leave the store. Of course Layer 2 solutions solve for this, whether Bitcoinās Lightning Network or Ethereumās rollups or even Plasma sidechains like Polygon.
But abstraction and, worse still, fragmentation can discourage users. Indeed the ideal amount of friction for most modern people is none at all. And thus the rise of Layer 1 solutions.
The history of blockchains tells us that most monolithic approaches fail, and yet itās entirely plausible that they donāt actually have to. While some such chains like EOS or Solana, are likely more hype than reality, as weāve seen already, Avalanche is doing something truly innovative š
And the result? Avalanche can reach thousands of transactions per second, with a high degree of decentralization and security. Furthermore, this transaction count can be achieved on a per subnetwork basis š²
Subnets
Subnetworks are similar to shard-chains (as seen in Ethereum 2.0, Polkadot, Elrond and several other networks).
Sharding is the process of partitioning various system resources in order to increase performance and reduce load. There are various types of sharding mechanisms. In network sharding, the set of participants is divided into separate subnetworks as to reduce algorithmic load; in state sharding, participants agree on storing and maintaining only specific subparts of the entire global state; lastly, in transaction sharding, participants agree to separate the processing of incoming transactions.
In Avalanche Borealis, the first form of sharding exists through the subnetworks functionality. For example, one may launch a gold subnet and another real-estate subnet. These two subnets can exist entirely in parallel. The subnets interact only when a user wishes to buy real-estate contracts using their gold holdings, at which point Avalanche will enable an atomic swap between the two subnets.
ā Avalanche Platform Whitepaper (page 12)
So in essence, subnetworks (aka subnets) allow for the spreading of the network load such that only those who wish to be stakeholders in a given asset need participate (by becoming validators). Each subnetwork can contain multiple blockchains or DAGs of its own, which can be either public or private. This could be useful for companies or governments to make use of blockchain technology without exposing customer or citizens private data šµļø
There is only one subnet which every validator must validate, the Default Subnet which contains Avalancheās three main chains:
(X) The Exchange Chain
(P) The Platform Chain
(C) The Contract Chain
The X-Chain
This DAG-based chain serves two important functions. It is used for payments due to its relatively simple functionality (it does not allow for the execution of smart contracts) and it is used for the creation of $AVAX and other assets.
The P-Chain
This chain handles data/metadata. More specifically, it allows for the creation of subnets and blockchains, and the addition of validators to subnets.
The C-Chain
This is the chain you will be most familiar with as you begin using Avalanche. It is an EVM-compatible smart contract blockchain. As such, it works with Metamask and connects to Solidity dApps that have been ported to (or built natively for) Avalanche. If you have ever used Ethereum or any EVM blockchain such as Polygon, Terra, Harmony, Celo, or any rollups like Arbitrum or Optimism, this will function in essentially the same way from a UX perspective š
In the video that accompanies this article, I show you how to add Avalanche (C-Chain) to Metamask, send $AVAX from exchange to your wallet, and do a few basic smart contract interactions: swaps on a decentralized exchange (Sushiswap) and depositing into PoolTogetherās prize-linked savings š°
Speaking of which, letās talk a bit about talk about the token that powers this whole ecosystemā¦
$AVAX šŗ
Avalancheās native token has a lot in common with Ethereumās Ether token; at least in the upcoming proof-of-stake system known as Ethereum 2.0. Given, however, that outside of Kintsugi testnet users, none of you will have hands-on experience with that, I will instead draw comparisons to a token which is available for use today: $LUNA š
Like $LUNA does for the Terra Blockchain, $AVAX serves the following functions on Avalanche:
- A unit of account
- Used to pay transaction fees
- Secures the network by serving as collateral for staking
Similar to LUNA and Ethereum (since the implementation of EIP-1559), $AVAX is burned with each transaction, adding deflationary pressure š„ Unlike those examples, where a base fee is burned, and a premium is paid to validators/miners, all of the $AVAX from the transaction fee is burned. And given that the total supply of $AVAX is capped at 720,000,000, the constant reduction in supply is a net benefit to all network stakeholders, including those who are invested passively š
Since they donāt receive the transaction fees, stakers earn, instead, rewards paid out by token inflation. There are two interesting features of these staking rewards. First, while Avalanche does not employ slashing to penalize bad actors (in part due to their confidence that their consensus mechanisms sufficiently neutralize them), the rewards themselves are the incentive not to go against the network. Validators who maintain adequate network uptime, validate transactions, and maintain stake within the minimum and maximum allowable durations, will receive compensation of up to 11% annually āØ
Secondly, the staking rewards/issuance rate, as well as the transaction fees, and requirements for staking, are allāāāwithin certain pre-established boundariesāāāsubject to vote by avalanche holders.
Thatās right, unlike $LUNA and $CELO, it is not only the stakers who can vote (though only they can create proposals)ā¦
$AVAX is a highly inclusive platform, which enables anyone to connect to its network and participate in validation and first-hand in governance. Any token holder can have a vote in selecting key financial parameters and in choosing how the system evolves.
ā Avalanche Platform Whitepaper (page 2)
Conclusion
In Avalanche, we see a platform that tries to defeat the blockchain trilemma through innovative approaches that donāt rely on centralization. Thus far, no other blockchain has succeeded at achieving this. The most promising contender, in my view, is Ethereum with its modular roadmap, but this is still but a work in progress ā³
Avalanche too chooses modularity, but in a novel form. It claims to optimize for speed and security while still simultaneously achieving decentralization, but it does so through complex interwoven mechanisms that most either pretend to understand, or ignore completely šµāš« Merely scratching the surface in this article has required weeks of sifting through whitepapers, articles, and youtube videosā¦
This complexity, like so much in blockchain, can be a turn off to newcomers. Often it feels like smoke and mirrors, distractions that serve to cover overly-centralized, or ill-conceived designs. This skepticism is necessary, laudable even. Complacency will benefit no one long term. Other chains making grand promises and frequently touted as Ethereum-killers, from EOS to Solana, do not inspire much confidence under scrutiny š
Yet, Avalanche, stands out, to me at least, as one to watch. I began investing months ago. Mostly, I was just curious. And like so much of what I do for this project, I cared more about experimentation than guaranteed returns. Perhaps Iām not the greatest investors, but I am a technophile š¤ And if this worksāāāif any of this worksāāāit could mean a reshaping of the internet, of commerce, of ownership, and even of democracy. So I remain hopeful that the blockchain trilemma is either solvable, or that Kevin Sekniqui is correct and āthere is no blockchain trilemmaā
Until next time šĀ
Thumbs Up
This post is brought to you thanks to a grant from PoolTogether.
As always the opinions expressed are my own, I do not work with projects I donāt believe in, and I implore you to do your own research before investing. If you have any questions, feel free to comment below or tweet at me. If you liked what you read, considering tipping to thumbsupfinance.eth orĀ thumbsupfinance.crypto. Iāve doneĀ a threadĀ about how to do this š