Avalanche 101

Avalanche 101

Revolutionizing Blockchain Technology: An Introduction to Avalanche

ยท

4 min read

The Avalanche blockchain is an open-source, Proof-of-Stake based, highly scalable, and interoperable ecosystem, using a public network. It ensures near-instant transaction finality. It was founded by Emin Sirer, who is the CEO of Ava Labs in 2020.

Avalanche Platform

Generally, whatever chains we study are single chains. But, this is exactly where Avalanche tweaked things. ๐Ÿ’ก

Avalanche is a heterogenous network, with separate chains dedicated to different use cases. This distributes transaction loads to different chains. Normal blockchains are homogenous chains with all applications being congested into the same chain.

The primary network of Avalanche is a special global subnet, consisting of all validators. For becoming a validator, a node has to stake 2000 AVAX (the native currency of Avalanche).

Image Source: https://docs.avax.network/

Chains

The Avalanche network has 3 chains, all designed and dedicated for specific purposes. They are :

(1) Contract Chain (C-Chain)

  • It uses Coreth Virtual Machine (CVM), that has based on Ethereum Virtual Machine (EVM).

  • It is used for developing and deploying Ethereum-compatible smart contracts(NFTs,Dapps,etc.). Such applications need total ordering (consensus on timestamp) or any other communicative applications.

  • CVM executes bytecode of smart contracts (generated by compiling Solidity code using a solidity compiler). CVM handles taks such as stack management, gas calculation, memory allocation and enforcing rules and limitations of EVM.

  • It is compatible with Metamask. Many Defi platforms using AVAX like Aave and Benqi use C-Chain.

(2) Platform Chain (P-Chain)

  • This chain coordinates validators, keeps track of active subnets, and enables the creation of new subnets and other platform-level operations.

  • It does not support smart contracts or dapp execution.

  • Hence, it uses a special VM called Platform Virtual Machine (PVM) that imposes required limitations and lets developers deploy their applications without worrying about the infrastructure.

(3) Exchange Chain (X-Chain)

  • It bears the responsibility of exchange operations of digital smart assets called Avalanche Native Tokens (like AVAX).

  • It enables the creation of new assets, exchange between assets, and cross-subnet transfers.

  • It is not primarily used for Defi platforms. It is even not used with Metamask, but rather used with Avalanche Web Wallet.

FeaturesC-ChainP-ChainX-Chain
UsecaseFor deploying Ethereum-compatible smart contractsFor managing validators and subnetsFor asset creation and exchange operations
Addressing StyleEthereum-style (0x) at beginningbegins with "X-avax"begins with "P-avax"
Virtual Machine Instance usedCoreth Virtual Machine (CVM)Platform Virtual Machine (PVM)Avalanche Virtual Machine (AVM)
Consensus UsedSnowman protocolSnowman protocolAvalanche protocol

You must be wondering about the Consensus: Snowman and Avalanche. I feel it will be fair to dedicate an entirely separate blog to them.

AVAX

The native token of Avalanche has a capped supply of 720 Million AVAX. It is used to secure the system via staking, bear the transaction fees and reward the validators.

The gas fees are burned or removed permanently from circulation.

360 Million AVAX were minted at genesis and small amounts of AVAX are constantly minted as a reward to validators at the end of their staking period.

The inactive or malicious validators are not penalized by slashing or eating away part of their stakes. Their stakes are just returned as it is without any rewards.

Virtual Machines and Subnets

A special feature of Avalanche is its flexibility. It allows developers their custom implementation of VMs over their blueprint.

Subnet

A subnet is a small network created by a group of validators to validate transactions for a specific-purpose application. All subnets are isolated and distinct from each other. They don't affect each other or Primary Network, but still are interoperable and work within Avalanche itself.

Transaction fees, block size limits, and networking can be set up for custom implementation over a VM abstraction.

VMs communicate with Avalanche using Remote Procedure Calls (RPC). They can be implemented using popular languages like Golang and Rust.

Congrats ๐ŸŽ‰!! You have got almost all the basics required to understand the Consensus.

You would be confident about the flexibility offered by Avalanche, but still wondering about the Safety and Liveness ensured by consensus protocols. I completely understand that and would be bringing the next part very soon.

Thanks for reading !! Hope you enjoyed and expanded your knowledge.

ย