Image of a snowboarder for article covering dApps on Avalanche.

Avalanche is a smart contract platform designed to be both extremely fast and scalable, as well as highly customizable. It not only supports the Ethereum Virtual Machine but also application-specific sharding, network-level programmability, and non-fungible tokens.

Avalanche aims to scale to Visa-level throughput with sub-second finality (meaning it can complete transactions within one second).

To reach these aims, Avalanche employs a novel consensus mechanism and network topology that can be daunting in its complexity. In this post we’ll explain how it works and why you might want to build smart-contract-based decentralized applications (dApps) on Avalanche.

This is part of a series of posts introducing Axelar-connected chains to builders. With Axelar’s secure cross-chain communication, Web3 developers build on the platform that best suits their use case, and provide one-click experiences that link their users to assets and liquidity on any connected chain. To find out more about building cross-chain with Axelar, visit Axelar’s docs, see the list of connected chains and check out a set of example dApps on the Axelar GitHub.

A novel consensus mechanism

There are two broad approaches that have been used in the past to establish consensus in distributed systems.

Consensus comparison table btw Nakamoto, Classical & Avalanche consensus for dApps on Avalanche.

Source: https://docs.avax.network/assets/images/Consensus-protocol-comparison-aa555b20f36947d6a5ff869d8758fa6e.png

Classical consensus

Classical consensus protocols, such as Practical Byzantine Fault Tolerance (PBFT), are based on all-to-all voting by the nodes in the network. This means that a validator needs to hear from a vast set of nodes on the network to come to a decision.

This means that transactions can be finalized in an instant after a node has received responses from the requisite fraction of the nodes, so it’s fast. However, it does not scale well with the number of participating nodes, making it unsuitable for large distributed systems.

Nakamoto consensus

Instead of waiting for absolute certainty across all nodes in the network, Nakamoto-based protocols trade-off an indistinguishable difference in probability for greater scalability. This means that a consensus on the current state of the blockchain does not have to be perfect all of the time across all nodes. There is room for a minor difference, which will be resolved probabilistically as time passes and nodes gravitate toward the longest chain of valid blocks.

It was created by Satoshi Nakamoto and is used by the oldest and largest blockchain in the world, Bitcoin. Proof-of-work is a component of Nakamoto Consensus.

But despite how revolutionary the Nakamoto consensus was, there are serious issues with energy consumption and transaction scalability.

Avalanche consensus

Avalanche consensus is a proof-of-stake consensus that combines the benefits of both Classical and Nakamoto consensus mechanisms.

Essentially, it showed that using probabilistic approaches to the standard Classical consensus allows us to scale a Byzantine Fault Tolerance network without sacrificing security. It truly represents the best of both worlds.

And it is a DAG-optimized consensus protocol that can handle multiple transactions at once. (DAG or Directed Acyclic Graph is a data structure that gives a partial ordering of decisions.) This, of course, means that particular transactions on the network will not slow it down as they do on traditional blockchain architectures. And although the Avalanche network uses a proof-of-stake mechanism, subnets can be launched with both proof-of-work and proof-of-stake.

You can see the exact mechanism over here.

Consensus flow chart diagram for dApps on Avalanche.

Source: https://docs.avax.network/assets/images/howavalancheconsensusworks-a37dc2bdf67c7c2997dcbfd01ee28e64.png

DApps on Avalanche take advantage of this fast and efficient consensus to deliver low latencies and low fees to their users.

Avalanche network topology

Avalanche includes three built-in blockchains rather than just one. Each of the three chains specializes in a specific task, allowing the Avalanche platform to support fast, low-cost transactions while also providing reliable security and a high level of decentralization.

The three built-in blockchains are:

  • Exchange Chain (X-Chain)
  • Platform Chain (P-Chain)
  • Contract Chain (C-Chain)

All three blockchains are validated and secured by the Primary Network. The Primary Network is a special subnet, and all members of all custom subnets must also be a member of the Primary Network.

Network topology diagram for dApps on Avalanche

Source: https://docs.avax.network/assets/images/primary-network-71c0c060a5ad7654635f8ff8110e272e.png

Exchange Chain (X-Chain)

The X-Chain is the blockchain responsible for creating and transacting Avalanche assets, or in other words, it is used to mint, send, and receive funds, and that’s its sole purpose. It uses the Avalanche consensus protocol and can handle approximately 4,500 transactions per second.

One asset traded on the X-Chain is AVAX which is used to pay for all transaction fees on Avalanche and these transaction fees are burned.

Platform Chain (P-Chain)

The P-Chain is Avalanche’s metadata blockchain, which coordinates validators, keeps track of active subnets, and allows for the creation of new subnets. It is the location where validators stake AVAX in order to secure the Avalanche Network.

The P-Chain uses a standard blockchain that runs the Snowman consensus protocol, a chain-optimized consensus protocol–high-throughput, totally-ordered, and great for smart contracts, and it can process approximately 1,500 transactions per second.

Contract Chain (C-Chain)

The C-Chain is where smart contracts and dApps on Avalanche are deployed. It uses the modified version of the Ethereum Virtual Machine.

It also uses a standard blockchain that runs the Snowman consensus protocol and it can process approximately 1,500 transactions per second.

Subnets

As mentioned above, Avalanche’s P-Chain allows everyone to create their own subnet on the Avalanche network in a permissionless way.

A subnet, or subnetwork, is a dynamic set of validators working together to achieve consensus on the state of a set of blockchains (public or private). Each blockchain is validated by exactly one subnet. A subnet can validate many blockchains. A node may be a member of many subnets.

Avalanche’s ability to create custom subnets is a powerful feature that sets it apart from many of its competitors. Subnets can be created on-demand and used to improve the network’s overall scalability or to implement specific use cases, such as enterprise applications. And if necessary, subnets could launch their own sub-subnets using the same design principles.

You can read more about the Avalanche Platform here.

Why you should consider building dApps on Avalanche

Avalanche has some of the most impressive performance numbers in the blockchain space in terms of throughput, speed, and transaction fees thanks to its unique consensus model and reliance on three different blockchains.

The network is more scalable than many other blockchains, with up to 4,500 transactions per second and a time-to-finality of less than a second. Avalanche’s network efficiency also makes it much more cost-effective than many others, which has become increasingly important in recent months.

Nearly 1,400 validators and nearly 20,000 delegators are currently securing Avalanche. This makes it one of the most decentralized blockchains in the world, and it also includes full support for the EVM, which means you can use all of your favorite Ethereum tools, such as Metamask and Remix, right out of the box.

What are the biggest dApps on Avalanche?

This is why developers have built hundreds of dApps on Avalanche. Here are two of the biggest:

Trader Joe

Trader Joe is a decentralized exchange (dex) built on Avalanche. Among dApps on Avalanche, deFi is a popular category and Trader Joe is among the most heavily used of the Avalanche deFi apps, according to DappRadar.

Trader Joe bills itself as a “one-stop-shop”: in addition to trading, it allows users to farm, stake and lend tokens. It also invites users to participate in token generation events.

Trader Joe handles about $10 million in volume daily at this writing, according to Nomics.

Pangolin Exchange

Pangolin is another dex built on Avalanche. It emphasizes fast settlement, low fees and “democratic distribution.”

Pangolin’s functionality and user interface will be familiar to users of dexs on other chains. In addition, Pangolin adds some features, like margin swaps, that aren’t commonly found.

Pangolin handles about $2 million in volume daily at this writing, according to Nomics.

Conclusion

The innovative Avalanche consensus provides a fast, secure, high-throughput, and scalable network to dApps on Avalanche. Subnets are also one of the best features of Avalanche because they allow anyone to create their own blockchain with the most appropriate customization in the least amount of time and money.

Furthermore, developers with an EVM background can work with it using familiar tools, and existing platforms can seamlessly deploy to it too. (For an introduction to Solidity tools, see our intro to another EVM chain, Fantom.)

The Avalanche network is still in its early stages, but if you’re looking for a blockchain for your amazing project, Avalanche is undoubtedly one of the best options.

This is part of a series of posts introducing Axelar-connected chains to builders. With Axelar’s secure cross-chain communication, Web3 developers build on the platform that best suits their use case, and provide one-click experiences that link their users to assets and liquidity on any connected chain. To find out more about building cross-chain with Axelar, visit Axelar’s docs, see the list of connected chains and check out a set of example dApps on the Axelar GitHub.

Snowboarder image cc0 via Unsplash & https://pxhere.com/en/photo/335131.

  • Cross-chain generalised message passing is a primitive which will unlock blockchain overlay networks, and with them, a new era of blockchain computational power and usability.

    Continue reading
  • This article originally appeared on the Author’s Medium page. Check […]

    Continue reading
  • Fantom is an EVM-compatible low-gas-fee dApp platform.

    Continue reading
  • Cross-chain generalised message passing is a primitive which will unlock blockchain overlay networks, and with them, a new era of blockchain computational power and usability.

    Continue reading
  • This article originally appeared on the Author’s Medium page. Check […]

    Continue reading