What is a consensus algorithm?

By Anycoin Direct

When you see these terms like this for the first time you will scratch your head behind the ears. A consensus algorithm? What the hell is that? After following this lesson, you will not only know what it is, but also what forms it takes.

Key indicators

✔️ Consensus in the context of cryptocurrency means agreeing on the state of a blockchain.

✔️ An algorithm is a way to solve a mathematical or computer-related problem.

✔️ A consensus algorithm ensures that validators work together to ensure a correct new block in a blockchain.

Consensus algorithm

A consensus algorithm consists of two words, the first of which is fairly easy to explain. Consensus means agreement, or agreeing with each other.

In the context of cryptocurrency, consensus means agreeing on the state of a blockchain.

And here comes the tricky part. Everyone knows the word algorithm, but what exactly does it mean?

An algorithm is a way to solve a mathematical or computer-related problem. It involves working from an initial state to the final goal by applying uniquely defined instructions. That's quite a mouthful. It can be easier!

The goal of an algorithm is to solve a problem. The instructions of a good algorithm work so that the end goal is achieved as efficiently as possible.

The word algorithm is currently used for all finite procedures to solve problems or perform tasks.

Thus, when we speak of a consensus algorithm we are talking about a set of instructions that lead to consensus being reached among the participants in a blockchain network. These participants must maintain (validate) the state of the blockchain network and always agree in majority that the new state of the network is correct.

In ordinary human terms, you could say that a computer program (algorithm) ensures that participants (validators) agree on a particular outcome (the state of the blockchain).

An example of an algorithm is that of Euclid regarding the general divisor:

As long as A and B are not equal: subtract from the greater of the two the other. As soon as they are equal, the greatest common divisor is a (or b).

And this is just a simple example!

The word algorithm comes from ancient times. It is a corruption of the name of an 8th century Persian mathematician, Al-Chwarizmi. The first known algorithm for a computer was written in 1842 by Ada Lovelace, the daughter of lord Byron.

How does a consensus algorithm work?

A consensus algorithm ensures that validators work together to ensure a correct new block in a blockchain. It increases the security of a blockchain and ensures that a blockchain does not need maintenance, everything happens by itself. We call this decentralized, because the network does not need a central authority to control everything, like a bank, for example.

A new block in a blockchain contains transactions and new tokens. If a majority of validators agree on what transactions have occurred since the last block created and who gets to create the new block, the designated validator will start creating this block and the chain has grown larger by one block.

What variants of a consensus algorithm are there?

Proof of work

Validators who are allowed to create a new block are chosen in many ways. The best known way is proof of work (mining). In this, the person who solved a difficult cryptographic puzzle first is allowed to create the new block if a majority of his colleagues (also miners or validators) agree (consensus) that this new block is correct. This algorithm has proven to be very secure, although it is not sustainable because of energy consumption. The creation of large mining pools creates centralization.

Proof of stake

Another well-known way to do this is through proof of stake, of which there are many variants. This involves designating or drawing a particular validator who gets to create the new block if a majority of validators (nodes) agree that the new block is correct. Proof of stake involves putting coins at stake, or betting and holding. The security of this algorithm lies in the fact that the people who have to keep the network safe lose coins if they don't, and therefore it is very safe. However, people with many coins do get richer and richer and gain more influence on a network.

Delegated proof of stake

A small group of validators put many coins at stake and people with fewer coins put their coins at stake with these delegates. Delegates gain a large number of coins at stake, which they share with the people who delegated them. This consensus algorithm provides democratically elected validators and scales well. It can create favoritism though, where there is a favor factor among each other and a centralization of influence.

Proof of burn

This is a rather odd consensus mechanism where you are more likely to add a block if you burn more coins. Burning coins means destroying them, for example by sending them to the wrong network or something similar. Of course, inflation will be rather low if so many coins are burned, but since people don't like destroying their coins I guess it will never be very popular.

Proof of capacity

This consensus mechanism is also known as proof of space. The more space you add on your hard drive to a network, the more likely you are to get a reward for it. The advantage of this mechanism is that it is energy efficient. Disadvantages are that you need huge hard drives and have to secure them well against malware and viruses.

Proof of authority

You are not putting your coins at stake here but your name, or reputation. Anyone who does not take their responsibilities will be known as a bad validator, and other networks may start to avoid you. Especially big bags and exchanges cannot afford this. Because validators do not want to put their name on the line, they will behave well. Because they behave so well they will also have the most authority and thus get the most coins, creating centralization.

Proof of participation

This consensus algorithm also works with reputation, but among validators and nodes. The better they commit to a network, the more often they will be chosen to create new coins. It is one of the fairest mechanisms, although relatively few major coins work with it.

Proof of elapsed time

Whereas most blockchains are permissionless, meaning you don't need permission to join a network, this consensus mechanism is one where you do need permission. In this algorithm, validators are randomly assigned to be allowed to add coins to the blockchain based on who wakes up first, after the start of "sleep time" (elapsed time). It is fair, consumes little power, but you need permission to participate, which always carries a risk of being censored.

Delayed proof of work

This uses the hashing power of larger networks to protect the smaller network from attacks. This gives the network greater security.

Effective proof of stake

In this, early strikers, who are considered the most trustworthy, are most often designated to coin new coins. Rewards are still provided for newcomers, however, so that not all coins will centralize.

Pure proof of stake

This is a lottery-based algorithm where everyone is given the same number of "lots" to participate based on their coins at stake. Of course, the strikers with the most lots most often win. It is a very decentralized system.

Bonded proof of stake

In this consensus mechanism, you tie up your coins for a certain amount of time. The more you tie up, the more votes you get to submit. A disadvantage of this method is that strikers can lose a lot of money during the time their coins are tied up if the coin collapses or the bear market makes them worth less.

Nominated proof of stake

In this, stakers nominate validators to make new blocks. Whoever gets the most votes gets to do so.  There may be favouritism, with lesser validators still getting the most votes. From the other side, it is a simple system that consumes little energy and works quickly.

Proof of stake time

The longer you stake a coin, the bigger your rewards. This gives you very reliable validators, but they will have all the coins at some point, because no one is disposing of them anymore. The lack of supply can cause interest to drop and the price to even collapse.

Leased proof of stake

Here, stakers rent coins from validators, after which they receive a part of the proceeds of the blocks added by such a validator. One advantage is that you do not have to bet large amounts to participate. A disadvantage is that you have to start evaluating validators yourself before renting coins from a validator.

Anonymous proof of stake

This algorithm keeps your identity hidden, allowing you to stake and get rewards anonymously. These types of coins may be banned in some countries precisely because of the risk of money laundering and fraud.

Hybrid proof of stake

Combines proof of work and proof of stake. It tries to get the best of both worlds.

Delegated proof of contribution

The more you do for a network, the more likely you are to be allowed to create new blocks or receive coins. Both the voter and the nominee receive rewards from the network.

Secure proof of stake

This algorithm works with both number of coins at stake and rating of the validator. It uses an RNG that cannot be predicted or influenced. This is a pretty fair system.

Tresholded proof of stake

This is a kind of auction system, where strikers are allowed to add coins in proportion to the size of their bid for a certain amount of time. Since many people are chosen with a role and thus coins, this is a pretty decentralised system. The treshold means that you have to put in a calculated threshold to join for a reward.

Roll delegated proof of stake

In this, delegates are chosen via a RNG to add a new block to the blockchain. This prevents favouritism.

Proof of coverage

This consensus mechanism checks that you are indeed maintaining the network where you claim to hold. Participants in this network send and receive signals and are rewarded for doing so. It is a cheap, low-power way to add coins. The downside, however, is that places can become overcrowded with miners or the reverse, which can reduce revenues to a minimum.

Proof of history

This algorithm works with timestamps (keeps track of time) when a block is created. Using block height (indicates where in the blockchain the block is located) makes the network much faster. Bitcoin, for example, uses two timestamps.

Proof of importance

This is one of the weirdos among the Romans. You have to stake a lot of coins, if you are considered important you can harve a lot of new coins. You become important if you have a lot of coins, hold them for a long time and if you do a lot of trading with the coin. Keep off the grass! How can you think of this?

Delegated proof of broker

You become a broker if you distribute a certain number of coins over several exchanges. The network's software will then automatically execute trade routes through the liquidity aggregator of the broker's accounts. Strikers can choose a broker, who should provide attractive rewards. This principle is very fast and scalable.

Proof of transfer

This is a consensus algorithm using two blockchains. Validators transfer (transfer) coins to bid to win a kind of lottery to become the leader and be allowed to mine new blocks.

Proof of storage

Algorithm that proves you run something entirely from your computer.

Proof of activity

This consensus algorithm is a combination of proof of stake and proof of work, where all miners must come to an agreement and therefore all transactions are real. This is a very secure system, although scaling up may become an issue.

Test your knowledge

Question: 1/5What part of a blockchain network must reach consensus on a new block to be formed?
A2/3
B1/2
C1/3
DMajority