With the growth of interest in crypto and DeFi, many new blockchain platforms launched to provide different solutions to problems faced by Ethereum 1.0 - mainly, its inability to cope with congestion of the network resulting in slow and expensive transactions.
In 2020, Ava Labs presented a network called Avalanche. Made up of three primary blockchains, the network has the capacity to complete transactions in seconds, is able to scale, and has high-security guarantees. Let's take a closer look at what exactly makes Avalanche so innovative and special.
Avalanche is a proof-of-stake blockchain that uses its own consensus protocol and data structure. Let's take a simple example of what the Avalanche consensus looks like.
Imagine you are in a room full of people who need to decide what to order for lunch. People are faced with the binary choice of ordering pizza or barbecue, and everyone has an initial preference. The goal is to reach a consensus.
Each person goes around and asks a random subset of the people about their preferences. If more than half of the people want pizza, the person starts leaning toward pizza, too. In other words, that person adopts the preference of the majority.
Everyone repeats this process several times, and each time more people lean toward pizza. And the more people choose pizza, the more likely others will start leaning toward that option. After enough rounds of polling, a consensus is reached.
Let's move the analogy from pizza and barbecue to blockchain. This is how the Avalanche consensus protocol works. Until a node has decided on whether to include a transaction into the network, Avalanche queries 20 other nodes and asks their opinion. Those 20 nodes queried are referred to as the sample size.
If at least 14 nodes, or the quorum size, give the same response, that response is adopted as the new preference. For the final decision to be made, the node must receive the same quorum response 20 times in a row. This number is referred to as the decision threshold.
The sample size, quorum size, and decision threshold values are constant and quite small on Avalanche. As the network evolves, the sample size value remains unchanged, which makes the algorithm very scalable and is referred to as subsampling. The number of consensus messages sent per node will remain the same, no matter how many participants there are on the network, and a node will query 20 nodes, even if there are thousands of nodes.
Let's move on to how Avalanche stores data. One of Avalanche’s primary blockchains called X-Chain uses a DAG or the directed acyclic graph system common in computer science and often used in artificial intelligence.
If you look at Bitcoin or Ethereum, the blocks of these networks have one parent (going before) and one child (going after), and each block depends on its parent block. Avalanche, on the other hand, stores data in such a way that one network element can have multiple parents and multiple children.
In this diagram you can see that vertex A goes before vertex B, vertex B goes before vertex D, and vertex C goes before vertex E. So we can safely say that vertex A goes before vertex E. However, the ordering here is partial, and it is undefined for some elements. For example, we cannot definitely say whether vertex B is before or after vertex C.
But, what exactly are we talking about when we talk about vertices? Vertices on Avalanche can be compared to blocks in a linear blockchain. However, here, they are one of the most important optimization tricks. Vertices contain their parents' hashes and a list of transactions and allow transactions to be batched and voted on in groups, rather than each one individually.
And, this is where we get to another big idea of Avalanche, called transitive voting, that provides the network with high throughput. When a node receives a vote for a vertex, that vote counts for all transactions within that vertex and is applied transitively upwards - to all preceding vertices. Thus, each vote is effectively many votes in one.
If a vertex contains a transaction that has been rejected, then the entire vertex and all its descendants are rejected, and all valid transactions of that vertex are re-issued into a new vertex.
But then, how does Avalanche support protocols written for linear chains such as Ethereum? A chain-optimized consensus protocol called Snowman was developed for this purpose. Smart contracts, ERC-20 tokens, NFTs, and dApps are supported through the Snowman protocol, which is a subset of the Avalanche protocol but with each vertex having only one parent, giving full vertex ordering.
Avalanche is considered to be one of the fastest smart contract platforms in the industry and has over 1,300 validators securing the platform and processing transactions.
We'll continue to explore the Avalanche platform in our next videos. Stay tuned!
Aave will integrate Chainlink's Proof-of-Reserve, further increasing the platform’s security
Dec 23, 2022
Uniswap's governance proposal accepted
Dec 22, 2022