Getting to Grips with the Avalanche Chains. Understanding the Three Chains
Avalanche is one of the largest smart contract blockchains by total value locked. Here’s how it works, and how to get started.
Avalanche is one of the largest smart contract blockchain networks.
Created by a team led by Cornell computer science professor, Emin Gün Sirer, Avalanche improves on the pain points of its main rival, Ethereum – high costs, low speeds, and a lack of scalability – by attempting to offer the opposite.
But how does Avalanche work, why is it so popular, and how do you use it? Hashnode has your back.
How Does Avalanche work?
Avalanche is a smart contract blockchain network, just like Ethereum, Solana, and Cardano.
Smart contracts are bits of blockchain code that power decentralized applications, like lending protocols and decentralized exchanges.
The Avalanche network is one of the largest smart contract platforms. As of April 19, 2022, Avalanche hosts 11 billion USD worth of decentralized finance protocols, according to data from DeFi Llama, a blockchain analytics site.
DeFi Llama ranks Avalanche as the fourth-largest smart contract blockchain network, after Binance Smart Chain, Terra, and Ethereum.
Although each chain is different under the hood, differing in cost, decentralization, and speed, they all support decentralized applications and tokens.
So, what makes Avalanche different?
Chiefly, Avalanche is not just a single blockchain, as is the case with Ethereum or Bitcoin, but a set of three core blockchains.
These blockchains are known as the Exchange Chain (X-Chain), the Contract Chain (C-Chain,) and the Platform Chain (P-Chain).
Here’s what they all do:
What is X-Chain: The X-Chain is responsible for the Avalanche consensus protocol, as well as creating and exchanging assets.
It’s the chain you’ll use to trade cryptocurrencies on Avalanche, including its native currency, AVAX, and the largest Avalanche tokens, such as JOE, Wonderland and Yield Yak.
What is P-Chain: The P-Chain, also known as the Platform Chain, is responsible for coordinating validators on the Avalanche network.
It’s also responsible for keeping track of subnets – groups of validators that confirm transactions on blockchains related to Avalanche.
Splitting validators into groups allow validators to only confirm the transactions they care about the most.
What is C-Chain: The C-Chain is the blockchain that lets developers create smart contracts. These smart contracts can be written in the Ethereum Virtual Machine (EVM), meaning that developers can run Ethereum code on the Avalanche blockchain with little extra effort.
It even supports development tools native to Ethereum, like Remix, Truffle, and Tenderly. In fact, the C-Chain itself is a version of the EVM, as is the X-Chain.
Both the C-Chain and the P-Chain use a consensus protocol called Snowman.
Technically, this operates on something called a directed acyclic graph, or DAG. DAGs don’t confirm blocks of transactions, like Ethereum or Bitcoin, but instead present the blockchain history as a series of hashes – this is what’s known as a hashgraph.
With a DAG, you can follow the history of a blockchain over time by checking the parent of a transaction, and its parent, and so on.
Overall, Avalanche is a proof-of-stake (PoS) network, meaning that people stake coins to validate transactions rather than using power-hungry miners to confirm them.
Most of the major smart contract platforms are proof-of-stake, and Ethereum, the largest, plans to fully transition to proof-of-stake in 2022.
Separating the work across three chains should hopefully allow Avalanche to scale – to keep on growing without hitting bottlenecks or making transactions prohibitively expensive.
Avalanche claims that with subnets, the blockchain network can support an infinite amount of throughput compared to Bitcoin’s seven transactions per second or Ethereum’s fourteen.
And while transactions can take an hour to go through on Bitcoin, or six minutes on Ethereum, transactions are settled on Avalanche in under two seconds.
Avalanche is usually far cheaper than rivals like Ethereum. Its documentation advertises that it costs ten times less to deploy smart contracts on Avalanche than on Ethereum.
Although C-Chain transactions are dependent on the congestion of the Avalanche network, flat fees for other transactions mean that Avalanche’s current cheapness is tied to the relatively low value of AVAX.
Still, as of April 2022, the cost of sending a cryptocurrency between Avalanche wallets costs well under a cent; a similar transaction could cost several dollars on Ethereum.
Avalanche also claims that it’s more secure than its rivals.
While Bitcoin and Ethereum can technically be overrun by 51% attacks, when someone manages to temporarily control more than half the miners, Avalanche claims that someone would have to control more than 80% of the network’s hash power to run amok. (That said, Bitcoin and Ethereum are huge networks, and their vast size makes it difficult for someone to control more than half of all nodes).
Inside the AVAX Economy
Avalanche’s native token is AVAX. This is the coin that’s used to pay for transactions on the blockchain – a little like how SOL is used to pay for Solana transactions or ETH is used to pay for Ethereum transactions.
AVAX was one of the fastest-rising coins of 2021. Launched in October in 2020, it rose from about 3 USD per coin at the start of the year to highs of 134 USD in November – before crashing by the start of 2022.
As of April 19, 2022, Avalanche is the tenth-largest coin by market cap, with a market capitalization of 21.5 billion USD. This is less than a tenth of Ethereum’s market cap of 375 billion USD, which in turn is about half of Bitcoin’s market cap of 789 billion USD.
You can buy Avalanche from most major cryptocurrency exchanges. According to data from CoinGecko, Binance, Coinbase, and HitBTC are the most popular places to trade AVAX.
To fund the creation of the blockchain, the team behind Avalanche sold 360 million AVAX to public and private investors.
That accounted for half of its supply; the other 360 million will be distributed to stakers who validate transactions. Avalanche won’t create any more tokens.
AVAX has both deflationary and inflationary mechanics. Much of the first tranche of 360 million ETH is subject to vesting schedules; it’ll be released into public circulation within the next few years. The second batch of 360 million AVAX tokens will be introduced into circulation as stakers validate transactions. So, while the coin is subject to a hard cap – no more than 720 million AVAX tokens can ever exist, these measures will increase the circulating supply over time.
A deflationary mechanic counteracts the inflation of AVAX’s circulating supply. All fees on Avalanche are burned – destroyed – by the network, which will permanently decrease the number of AVAX in circulation. Right now, Ethereum also burns tokens instead of handing them to miners – at times, this has meant that Ethereum’s supply has been shrinking rather than rising.
Using a simplified supply-demand model, decreasing supply should increase demand for the coins that remain, thereby increasing the price. But increasing the supply should decrease demand for an individual coin, reducing the price. With Avalanche, both mechanisms are at play to encourage a healthy economy. And so far, it’s working.
Avalanche’s DeFi Economy
Avalanche has a thriving DeFi economy. Likely because of the name of the consensus mechanism, lots of the top DeFi protocols are themed around snow (for instance, Yield Yak, Snowball Finance) – Ethereum’s early DeFi ecosystem, by comparison, was based around food (CREAM, Pickle Finance, SushiSwap, and so on).
Most of Avalanche’s DeFi protocols fulfill the same function as their Ethereum analogs, and several protocols native to Ethereum also support Avalanche.
The largest – accounting for 24%, or 2.7 billion USD of Avalanche’s 11 billion USD total value locked – is lending protocol Aave. Stablecoin-centered DEX Curve comes next, with 1.43 billion USD in TVL. Trader Joe’s third, with a TVL of 1.21 billion USD. Trader Joe is the equivalent of Ethereum’s Uniswap – it’s a decentralized exchange for Avalanche tokens.
It’s not all been smooth sailing in Avalanche’s decentralized finance economy. One of its biggest protocols was Wonderland, a decentralized autonomous organization (DAO) that had forked from Olympus DAO.
Wonderland was similar, but focused more on being a kind of decentralized hedge fund, with some pseudonymous actors at the helm.
All worked well for a while, and the protocol quickly amassed over 1 billion USD until one of its operators was unmasked as Michael Patryn.
Patryn, whose real name is Omar Dhanani, was an executive at Quadriga CX, a defunct Canadian crypto exchange that forensic accountants later concluded was little more than a Ponzi scheme when it stopped servicing withdrawals in the late 2010s.
Patryn has a history of fraud and even served jail time in his early 20s. The token behind Wonderland cratered as investors took out hundreds of millions of dollars from the project.
Another unrelated Olympus DAO fork, Snowbank, also raised tons of money before failing. Of course, rival blockchains, like Binance Smart Chain and Ethereum, have had their fair share of scams, Ponzis, and rug-pulls, too.
How to Get Started With Avalanche
If you’re just getting started with Avalanche’s economy, you’ll need a cryptocurrency wallet and some AVAX.
AVAX is necessary to pay for transactions on the Avalanche network, like sending tokens between wallets or interacting with smart contracts and decentralized finance protocols. You can buy AVAX from crypto exchanges, such as Binance and Coinbase.
To do so, you’ll need to create an account, pass some KYC checks, and buy AVAX with cryptocurrencies or fiat currencies. Most exchanges also let you buy AVAX with debit cards, or with funds deposited via wire transfers.
Although you can hold AVAX on your own wallets, like Ledger or MetaMask, Avalanche has a proprietary wallet that makes it easy to bridge assets between the X, C and P chains.
Although you don’t need to pass any KYC checks to create a wallet on Avalanche, you'll have to memorize (or better, write down) a seed phrase to access the funds.
The wallet functions best as a bridge between Avalanche’s different chains.
You can use the X-Chain address to receive funds, but note that the address will change after each deposit – you can keep reusing old addresses, however. You can use the wallet’s “send” function to port assets between the X and the C chain.
Bridging tokens between blockchains is useful when you want to stake tokens on Avalanche. You can earn additional AVAX tokens by staking tokens you hold in your wallet on the P Chain.
You can become a validator yourself by staking 2,000 AVAX, or earn a cut of validator fees by delegating at least 25 AVAX.
You can also use other wallets, like Metamask. The process of creating a Metamask wallet is very similar – write down your seed phrase and away you go. Once you’ve mastered the basics, you can get stuck into Avalanche’s DeFi ecosystem.
You don’t need to create an account to get started – you just connect your wallet to the protocol by hitting the “connect wallet” button. Remember that you’ll need some AVAX to push your transactions through.
With a bit of training, you could even create a smart contract application of your own.
This article is a part of the Hashnode Web3 blog, where a team of curated writers are bringing out new resources to help you discover the universe of web3. Check us out for more on NFTs, DAOs, blockchains, and the decentralized future.