A beginner's guide to blockchain consensus and validation.

The traditional world of finance, or TradFi as it is sometimes called, rests on a network of governing bodies that oversee transactions and engender consumer trust in the validity of the system as a whole. However, the world of decentralized finance (DeFi) generally lacks centralized authority of this nature—in fact, the “trustless” quality of DeFi is one of its defining characteristics. While specific application features may have a centralized basis (e.g., price feeds, RPC nodes), blockchains are designed to carry out countless transactions per day without a single central authority supervising all this activity.

But without a centralized authority, how can blockchains ensure that new transactions are valid? What is to prevent a malicious actor from adding falsified blocks? Consensus protocols provide the solution. A consensus protocol is a procedure chosen by a blockchain’s creator to empower users to verify transactions via the automated application of predetermined rules. Every blockchain uses one, and only one, consensus protocol.

There are literally dozens of consensus protocols in existence, but only a small handful are in wide use. In recent years, the proof-of-stake (PoS) protocol has surged in popularity, in part due to its adoption by the Avalanche platform. Let’s take a closer look at PoS and how it compares with alternative consensus protocols

What Is Staking in Cryptocurrency?

The proof-of-stake protocol depends on the participation of users who are able to provide the modest amount of computational power necessary to validate transactions. These participants are known as validators, or nodes. Each validator earns the right to participate in consensus activities by putting up a certain amount of cryptocurrency; the specific amount varies by blockchain. This crypto investment is effectively “locked up” for a certain period of time during which it cannot be used for other purposes. (On Avalanche, this period is a minimum of two weeks and a maximum of one year.)

When a new block is proposed, the protocol selects a validator from the available pool to verify the transaction. Selection is performed in a pseudorandom manner: The odds that a particular node will be chosen to act as a validator depends on the proportionate number of tokens it has staked.

Once the new block has been successfully validated (according to established rules), the selected staking node receives a reward for its participation.

One of the main advantages of PoS is its disincentivization of fraud. Although a validator could possibly approve a falsified block, they would lose their stake by doing so. Aside from eradicating the stake used for such undesirable purposes, blockchains have a variety of ways to punish suboptimal node behavior, including banning the offender from the network. Many blockchains—but, it must be noted, Avalanche is not among them—use slashing, which involves taking away a certain number of tokens from a misbehaving node.

These measures give proof-of-stake blockchains a high degree of resistance to 51% attacks, where malicious actors take over the majority of hashing power to create falsified transactions.

Proof of stake has several other key advantages as well, and these can be best understood by comparing it to the proof-of-work (PoW) protocol that it is rapidly supplanting in the blockchain world.

Proof of Stake vs. Proof of Work

Proof of work was the original consensus protocol, and it has been successfully used for years to secure blockchains and process transactions. It relies on the ability of blockchain validators—called “miners” in a proof-of-work context—to provide the computational power to earn the right to confirm a new block. They earn this right by competing with one another to solve a complicated cryptographic puzzle; the winner receives a crypto reward for their efforts.

PoW is highly effective at discouraging casual vandalism, as it takes a tremendous amount of hardware power to participate in validation activities. However, that’s also the major drawback of PoW—it is mind-bogglingly energy-intensive. A 2019 study found that on an annual basis it took literally as much energy to maintain the proof-of-work Bitcoin blockchain as consumed by the entire country of Switzerland.

The proof-of-stake protocol was designed to address the shortcomings of PoW. In a proof-of-stake blockchain, the hardware investment required to participate in validation is far smaller than a typically gargantuan proof-of-work setup. In fact, PoS generally requires no special investment at all; on Avalanche, validation can usually be performed with a consumer-level laptop.

By forgoing the need for expensive equipment, PoS encourages participation from a broader range of blockchain enthusiasts. There’s significantly less chance of the blockchain becoming dominated by a tiny pool of validators. This supports one of the key goals of the blockchain field: creating a decentralized financial system.

Proof of Stake on Avalanche

The Avalanche platform uses the proof-of-stake method of verifying transactions, aided by the unique Avalanche consensus, an alternative to the traditional Nakamoto consensus used by proof-of-work platforms. Like Nakamoto, Avalanche consensus is a probabilistic protocol. It works by effectively turning each node into an independent voting station that decides whether a new transaction is to be accepted or rejected, according to the validation standards of the blockchain.

Avalanche consensus uses repeated random subsampling—a validating node arbitrarily selects a small group of other validators to make an accepted/rejected decision—until a sufficient confidence threshold is attained. This process is designed to ensure an extraordinarily small margin of error while promoting scalability and high-throughput.

Another attractive feature of Avalanche consensus is its relatively small energy consumption. The consensus is designed to compel node activity only when there is a transaction to be voted on. Otherwise, nodes are silent.

How to Validate on Avalanche

On Avalanche, nodes stake AVAX, the platform’s native coin, to serve as validators. There are two ways to validate transactions on Avalanche: as a validator, or as a delegator.

A validator is an active node that must be online at least 80% of the time. Avalanche validators must stake at least 2000 AVAX, for a period of at least two weeks and no longer than one year. Keep in mind that a validator's participation activities, and commensurate rewards, increase with the number of AVAX staked.

Some users prefer to act as delegators, which relieves them of the burden of being online and active so often. Delegators basically select another node to take over validation responsibilities. Becoming a delegator requires a stake of at least 25 AVAX, which will be locked up for at least two weeks and no longer than one year. Delegators also must pay a small additional fee to offset the labor they're shifting onto another node.

Staking crypto on Avalanche helps secure the system and provides opportunities to generate income. Validators can earn up to 10% Annual Percentage Yield (APY) on their staked AVAX.

For more information on validating Avalanche, you can explore the resources available in the fast-growing online Avalanche community.