Fresh Snow: A Deep Dive into Avalanche Network

By Thumbs Up | Thumbs Up Finance | 13 Jan 2022


1*tLFwsZfFBWtUh4aQZmVIFw.jpeg

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 šŸ’–

How do you rate this article?

72


Thumbs Up
Thumbs Up

crypto, creativity, commerce


Thumbs Up Finance
Thumbs Up Finance

exploring the intersections of crypto, creativity, and commerce through my newsletters, deep-dive blog posts, explainers, and tutorials

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.