This primer serves as an initial resource for developers and systems designers interested in breaking into the Avalanche community, informing new users how Avalanche could be leveraged in new products.

Why Avalanche?

Avalanche was created to fill use cases that existing platforms are unable to provide while retaining the promise of decentralization. People who use Avalanche do so because they need to support their high-throughput systems but do not wish to rely on a trusted intermediary. With the ability to partition private data away from the rest of the Avalanche network while still being a member of the overall network, Avalanche enables the privacy use cases other platforms do not. With fast decision times and reasonable hardware requirements, Avalanche powers a system that can accept many times the data and productive yield that existing decentralized systems provide at a low cost to the end user. Avalanche is an asset engine that can deploy and power new markets or integrate existing ones into a global exchange backbone.

What is Avalanche?

Avalanche is the first next-generation blockchain using Proof of Stake to deliver at the scale DeFi demands. Enabled by the most advanced consensus technology, the Avalanche protocol, Avalanche achieves high-throughput in excess of 4500 TPS, fast finality at less than 3 seconds, and all with unprecedented decentralization. Built as a platform, Avalanche enables anyone to deploy subnets, private or public, and create custom execution environments to solve their network’s needs. With the ability to create and trade assets between chains and subnets, Avalanche services all industries as an infrastructural backbone for the internet of exchange.

Avalanche is powered by the Snow family of consensus protocols, outlined by the Team Rocket paper in 2018. This protocol uses random repeated sub-sampling to achieve consensus across the network extremely quickly. This new class of protocols was vetted and analyzed by a team of PhD researchers from Cornell university who were happy to report that the protocol works! This launched Ava Labs in late 2018 as they began work creating the Avalanche Platform.

How Avalanche Compares

Avalanche is an order of magnitude improvement over previous decentralized protocols (and in some cases, two orders of magnitude). The below chart compares Avalanche to existing technologies:

Avalanche provides all of the advantages and none of the downsides of existing protocols. It even is resilient to 51% attacks!

Avalanche Platform Core Concepts

The architecture consists of four core concepts:

Consensus Engines

The Snow family of consensus protocols is the foundation for Avalanche. The platform has two consensus engines on launch:

Avalanche — DAG-optimized consensus first outlined in the Team Rocket paper. High-throughput, parallelizable, simple to prune.

Snowman — Chain-optimized consensus first created by the Ava Labs team. High-throughput, totally-ordered, great for smart contracts.

Consensus is separate from the underlying data structure, so one could create a UTXO-based or Account-based Snowman blockchain.

Virtual Machines (VMs)

VMs in Avalanche are code that uses consensus to produce a database. This database can be in the form of a chain, a DAG, a log file, or some other data structure that requires synchronization across multiple machines. The VM logic can be deployed many times across many subnets, each one creating an individual ChainID for that instance.

Chains

Chains are a generic term for VM instances. Each chain is assigned a ChainID and can be part of one and only one subnet. However, the same VM can be used to deploy the same type of chain multiple times within a subnet or in other subnets. For instance, one could deploy their own EVM in their subnet as well as use the EVM in other subnets and these two VMs would be completely different state machines.

Subnets

Subnet (sometimes referred to as a “subnetwork”) is a subset of validators in the Avalanche platform who have opted to participate in validating a group of chains. All chains deployed on a subnet will be validated by the validators who choose to become members of that subnet. Subnets are required to create their own incentive mechanisms for these validators. Subnets can have dozens of chains if they choose.

The Avalanche Subnet

Avalanche implements a default main network containing three chains:

The Avalanche network is a subnet that has three chains: P-Chain, X-Chain, and C-Chain. Every validator on the Avalanche platform must validate these chains. For additional chains, first create a new subnet using the P-Chain, then add chains to the subnet, also through the P-Chain.

The X-Chain is for the Avalanche token and creation of new asset classes. It uses a DAG with a UTXO model which is highly parallelizable and easily pruned. This enables fast exchange of assets throughout the Avalanche ecosystem.

The C-Chain is a clean state copy of the EVM. This enables smart contracts to by providing you with a full Geth node using Snowman consensus instead of Nakamoto.

The Avalanche subnet is not optional to validate in the Avalanche platform. Staking in the main subnet enables validators to participate in other subnets. This also enables cross-chain commitments between subnets. By having a common group of validators, Avalanche ensures the safety of the subnets are rooted in the P-Chain.

Tools of the Trade

Avalanche has several tools available to build and develop on the platform.

Gecko

The first client for the Avalanche network, written by Ava Labs. Gecko is a Go implementation of the Avalanche protocol. It has a full suite of JSON RPCs for interacting with the VM APIs. It comes replete with a local Keystore, Metrics, IPC, and Admin APIs for interacting with the node itself.

Avalanche.js

The Javascript library for interacting with Avalanche APIs. Avalanche.js integrates well with existing decentralized applications to enable Avalanche integration. It has a modular library architecture, allowing for custom VMs to write plugins to extend Avalanche.js functionality.

Avash

Getting started with a local testing environment is daunting. Avash is a program written in Go that aims to enable the creation of local networks quickly for your testing purposes. With support for Lua scripts, Avash allows developers to automate various local networks, launch subnets, and deploy chains on these networks to integrate into CI pipelines.

Avalanche Wallet and Faucet

A wallet dapp and a faucet server have been open sourced to enable developers the ability to demonstrate the Avalanche ecosystem. Using the Wallet, funds can be sent and received throughout the network, supporting multiple assets in the X-chain. When using private shared testing environments, the faucet server is useful in allowing multiple users to gain funds for their own testing purposes.

Important Resources

Code Repositories

Developer Guides

Avalanche Docs — https://docs.avax.network/

— https://docs.avax.network/ Original Team Rocket Paper — https://ipfs.io/ipfs/QmUy4jh5mGNZvLkjies1RWM4YuvJh5o2FYopNPVYwrRVGV

— https://ipfs.io/ipfs/QmUy4jh5mGNZvLkjies1RWM4YuvJh5o2FYopNPVYwrRVGV Platform Papers — https://www.avalabs.org/documents

— https://www.avalabs.org/documents Installing Gecko and Avash — https://medium.com/avalabs/how-to-install-and-run-ava-borealis-971286add0c0

— https://medium.com/avalabs/how-to-install-and-run-ava-borealis-971286add0c0 Running the Wallet — https://medium.com/avalabs/the-ava-platform-tools-pt-1-the-ava-wallet-b2e849b57632

— https://medium.com/avalabs/the-ava-platform-tools-pt-1-the-ava-wallet-b2e849b57632 Running the Faucet — https://medium.com/avalabs/the-ava-platform-tools-pt-2-the-ava-faucet-48f28da57146

— https://medium.com/avalabs/the-ava-platform-tools-pt-2-the-ava-faucet-48f28da57146 Avalanche.js API — https://docs.avax.network/v1.0/en/tools/avalanche.js/api/

About Avalanche:

Avalanche is an open-source platform for launching decentralized finance applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Developers who build on Avalanche can easily create powerful, reliable, and secure applications and custom blockchain networks with complex rulesets or build on existing private or public subnets.

Website | Whitepapers | Twitter | Discord | GitHub | Documentation | Explorer | Avalanche-X | Telegram | Facebook | LinkedIn | Reddit | YouTube