Reviewing lesser known consensus mechanisms and their implementations in distributed ledgers.
*This article is a collection of posts that were originally published in The Daily Bit.*
Consensus Mechanisms — Class In Session
Over the next several days, we’ll be taking a closer look at some of the lesser known consensus mechanisms that are used in blockchain networks. After breaking down the features of each, we’ll pivot to a case study (or two) of them in use. Good? Let’s begin.
From the top — what is a consensus mechanism?
The term is self-defining: Consensus mechanisms are ways to guarantee a mutual agreement on a data point and the state — think of this as the layout — of all data. If applied in the classroom, a consensus mechanism would make it possible for every student to submit identical exams.
With blockchains, consensus mechanisms ensure that each player in the network has a copy of the same ledger. And, as expected, different consensus mechanisms impact 1) the security, and 2) the economic framework of the overarching cryptographic protocol (code of conduct) in varying ways.
One mechanism to rule them all: Not quite. Like a box of chocolates, consensus mechanisms come in a number of forms and won’t bring about the same result for every palate, or blockchain network, where they are used.
And because it’s so early in the process, it’s hard to say what consensus mechanisms will be the most popular down the road. Creating consensus mechanisms involves the study of mechanism design, which is a two-step process:
- Consider the desired outcome.
- Work backward to create a game that incentivizes players to fulfill that outcome.
Bitcoin’s consensus mechanism: Proof-of-Work. More on others to come.
1. Proof of Elapsed Time (PoET)
It’s finals season, and thirty students are grinding through their last exam. Taking a look up at the clock, an undergrad notices that the timer says “Sixty minutes remaining”. One hour later, everyone is out the door and off to the races.
The Proof of Elapsed Time (PoET) consensus mechanism operates in a similar fashion. For starters, PoET is used on a permissioned blockchain, meaning that every node in the system must be (1) identifiable, and (2) accepted into the network. In the class, all students know each other, and everyone had to be enrolled in the course to take the final.
But, there’s a twist. With PoET, the “timer” is different for each node. Every participant in the network is assigned a random amount of time to wait, and the first participant to finish waiting gets to commit the next block to the blockchain. Similar to pulling straws, but this time, the shortest stem in the stack wins the lotto.
PoET In Action: The PoET consensus mechanism was conceived by Intel in 2016 and can be used by Hyperledger Sawtooth, a platform that can build, deploy, and run distributed ledgers.
Difference from Proof of Stake: By requiring each node to “rest”, PoET is believed to be more energy efficient than PoS.
2. Proof of Authority (PoA)
Blockchains are cutting edge technology, but they have their limitations. Like most systems, blockchains have tradeoffs. Vitalik Buterin refers to this as the ‘Scalability Trilema’, identifying three desired attributes of blockchains:
Similar to the collegiate trilema of ‘Good Grades’, ‘Enough Sleep’, and ‘Social Life’, only two categories can be held at once. And with the growing number of dApps being built on Ethereum and other blockchain platforms, short-term scaling solutions are in high demand.
Unlike Proof of Stake consensus where nodes stake monetary value, Proof of Authority consensus stakes the actual identities of the nodes in the system. It’s a spin on PoS consensus that addresses a risk of how a stake can be valued by participants in a network.
Financial capital versus social capital
While PoS puts financial capital on the line, PoA consensus aligns incentives by placing social capital at risk. Suppose someone staking their coins with PoS consensus has a net worth of $1 billion. There is a greater incentive to act in the best interest of the network if more of their net worth is lodged in a node. That means wealthier participants could go AWOL as they can eat any financial loss they would receive for doing so.
Be mindful of the validators. They’re the nodes that stake their reputation on the network. As compensation, validators are the only nodes allowed to validate blocks. Several things to keep in mind when talking validators:
- Ensure a standard, robust process for identifying validators.
- Validators should be scarce, so there is a desire to hold the title.
- Have a reliable process for establishing .authority of all validators
Proof of Authority in action
By identifying validators, PoA consensus becomes inherently centralized. Therefore, it’s best suited for private blockchains and consortiums, such as a group of banks or insurance companies.
3. Proof of Capacity
After reviewing several consensus mechanisms, we believe that we discovered a pattern: Most of the lesser known types of consensus are intended to be an improvement upon either Proof of Work or Proof of Stake.
Our reaction: Hmmmm. Makes sense. In fact, this is similar to the concept of hard forks and why there are so many altcoins. New coins are an attempt to overthrow the “prehistoric” codebase of Bitcoin, offer a more advantageous solution to Ethereum, or solve more specific problems in the industry. The open source nature of the code fosters healthy competition.
With healthy competition comes… healthy analogies. It’s high school, and the closing bell just rung. All students take buses home, and each bus has a different number of seats that fall between 50 and 100. Each day, students walk onto a bus at random.
Consider that “boarding” process the first step of PoC consensus, which is known as “plotting”. In short, plotting involves determining all possible solutions to the hashing algorithm before the mining process begins. The second step is the actual mining, aka the energy demanding process of driving the bus.
The more seats, the better. That’s the gist of PoC. The shortest solution to the mining algorithm — that is stored in advance, remember — grants the rights to mine the next block. In our metaphor, that “solution” is liken to the student who lives closest to school (and probably doesn’t need to ride the bus to begin with).
- Efficient — Less energy used than Bitcoin transactions.
- Cheap — No need for specialized mining software.
- Distributed — Excess storage space is more accessible.
PoC in action: Burstcoin. IRL, the free space on your hard drive is used to mine coins with the solutions plotted in advance. A more detailed explanationon Burst’s PoC consensus can be found here.
4. Proof of Activity
At their core, consensus mechanisms have one thing in common: They’re all trying to prove something. In Proof of Work, that something is miners showing that their mining hardware “worked” to solve a mathematical puzzle. With Proof of Stake, it’s network nodes showing that they “staked” financial capital on validating transactions.
What’s being “proved” in Proof of Activity: Short answer — activity. Long answer — direct involvement in the mining process and signing of the next block in the blockchain.
Proof of Activity doesn’t try to reinvent the wheel as much as other consensus mechanisms spun off from PoW and PoS. That’s because PoA is a hybrid of the two. The mining process begins as your run-of-the-mill Proof of Work consensus shifts to a Proof of Stake approach once a miner finds the next block.
- New blocks only contain a block header and the miner’s reward address. In PoW, more data, such as a transaction root and a nonce, are in blocks.
- A random group of validating nodes are then required to sign a new block. The odds of being selected increase with a node’s purse size.
- Mining fees are split among the miner who found the block and the nodes that helped sign the block into existence.
PoA in action: Decred (DCR). The project has been around since 2016.
For the scholars: The original research paper for Proof of Activity can be found here.
5. Proof of Burn
At first glance, applying the “proof of ___” metric to PoB seems… complicated. How does one “burn” digital currencies that, at their base level, are strings of code?
The answer: Eater addresses.
Also known as an unspendable address, eater addresses are on the receiving end of all proof of burn transactions. They’re storage cells for coins sacrificed through proof of burn consensus.
Because addresses are generated randomly, it’s believed that nobody (not even miners) can determine the private key. So, the name abides — coins are effectively eaten.
Skin in the game
Of course, there’s an incentive for burning a hole in your pocket. A user who gives up short term wealth proves that they are following the consensus mechanism and is rewarded with a lifetime privilege to mine the next block on the blockchain.
More burnt coins = greater odds of being selected. However, stakes decline over time, meaning that you’ll need to burn tokens every now and then to continue receiving block rewards at about the same rate.
Pros: Like we mentioned, proof of burn consensus sets you back in the short term. The possibility for larger gains in the future could incentivize users to remain involved in the project, thereby preserving the network.
Cons: Proof of burn is comparable to Plinko — burning coins doesn’t guarantee that you’re selected to mine future blocks. And similar to proof of stake, the process favors whales who can commit more capital, tilting the odds in their favor.
PoB in action: Slimcoin uses proof of burn as a consensus algorithm, and Counterparty uses proof of burn to “seed” tokens. Seeding is a way to bootstrap one cryptocurrency by burning another. With Counterparty, users transfer Bitcoin to an eater address and receive XCP tokens in return.
6. Delegated Proof of Stake (DPoS)
Today’s consensus mechanism takes us for a democratic spin. As you might’ve guessed, DPoS is a twist on Proof of Stake consensus that relies upon a group of delegates to validate blocks on behalf of all nodes in the network.
There are typically 21 to 100 delegates elected in networks using DPoSconsensus. That headcount is a considerable drop from the 535 Members of Congress we’re used to seeing in the states, though as is the case here — and for Charmin’ Ultra — less is more.
The reason: Organization. Was your class ever instructed to line up in height order? Finding your position among a small group of peers is difficult enough. Roping in the entire grade makes it unnecessarily dicey.
The same idea applies with delegates. It’s easier for them to assemble themselves and allocate slots in which each delegate will publish their block when fewer parties are involved. And should a delegate fall out of line by either late or faulty reporting, nodes within the network can vote in a replacement.
Pros: Scalable, energy efficient, cheap transactions.
Cons: Partially centralized (Scalability Trilemma).
After all, he’s also the mastermind behind Delegated Proof of Stake consensus.
7. Byzantine Fault Tolerance
A Thousand Years Ago…
A collection of Byzantine generals circled a city with their respective divisions for an upcoming attack. However, in order for the siege to go swimmingly, they needed to come to a consensus regarding when to strike. If the generals didn’t coordinate successfully, the assault would fail.
Appropriately named the Byzantine Generals Problem (BGP), this classic dilemma alludes to a more popular type of consensus for cryptographic systems known as Byzantine Fault Tolerance (BTA) that calls upon a group of “generals”, or validators, to confirm that the information delivered to them is trustworthy.
Here’s the problem: Life was harder back then — the generals couldn’t schedule a conference call the night beforehand to finalize the strategy. A messenger would need to travel through the city and relay the message to each of the appropriate divisions.
But what if they are captured and the plans are read? Or tampered with? As it turns out, determining a way to ensure that the received message is trustworthy is quite problematic.
BTA in action: We came across two spinoffs of BTA consensus, though others could exist (this is crypto, after all — lots of room for imagination).
- Practical Byzantine Fault Tolerance: Used by Hyperledger Fabric, PBFT uses less than 20 pre-selected validators to determine consensus for the network.
- Federated Byzantine Agreement: Stellar and Ripple employ variations of FBA, which calls for each general (node) to establish truth for each of their respective chains.
Pros: Low transaction cost, high throughput, network scalability.
Cons: Centralized, permissioned.
8. Proof of Importance
As we’ve seen, different consensus algorithms can be incorporated into a decentralized network in order to incentivize users to follow a particular set of rules. And there isn’t a ‘one size fits all’ type of solution here — each mechanism has its own list of pros and cons, which have varying degrees of success depending upon the action that network users are encouraged to follow them.
Proof of Importance recognizes that other factors can be taken into account when determining what nodes provide the most value to a network. For example, Proof of Stake consensus risks giving too much power to those with large war chests in that a smaller percentage of total wealth could be committed to the network, which may not encourage one to act in the network’s best interest.
- Net transfers, or total spent in the last 30 days.
- Vested amount of currency to create blocks.
- Nodes that are clustered, aka more intermingled, are more heavily weighted.
Improvements on Proof of Stake:
- Less chance of hoarding. Traditional staking requires folks to commit positions and that’s it — no value is being transferred throughout the network. Net transfers provide a better grade to those who operate circulation stations.
- Nothing is at stake in PoS. The marginal cost of creating a block is zero, which means that users can continue validating blocks with PoS in the event of a fork. That risks siphoning users away from the more popular network as time progresses.
PoI in action: New Economy Movement (XEM) introduced Proof of Importance. And to deploy a masternode, or stake, you’ll need to hold a minimum of 10,000 XEM. Today’s market prices puts that cost at around $4,000.
9. Direct Acyclic Graphs (DAGs)
Yesterday’s newsletter drilled home the idea that all consensus mechanisms are created equal. The same applies for different types of distributed ledger technology. For non-blockchain database structures, DAGs are a popular form of consensus that have their respective strengths and weaknesses when it comes to managing data.
Mario Kart fans, please stand up. Remember Yoshi Valley? Upon entering the main part of the track, drivers can choose one of several pathways, which ultimately converge with other routes deeper into the track.
Substituting the Nintendo character and go-kart analogy with a more complex, principle-based set of engagements between nodes and transactions introduces the idea of direct acyclic graphs. The ELI5 explanation of DAGs is dots with lines pointing to other dots, with all lines pointing in the same direction.
It Takes Two To Tangle
IOTA uses a consensus algorithm known as Tangle, which is a type of DAG. To send a transaction, a node must validate two transactions that already took place. And as more transactions are sent through the network, that system of checks and balances strengthens.
Advantage over blockchain: No transaction fees. Transactions are approved as users contribute to the security of the network by confirming past transactions. Additionally, the IOTA network is “asynchronous”, meaning that not all transactions occur at the same time as they do in a blockchain database structure.
Application: Monetary transactions represent a small subset of the interactions that take place between our connected devices. Tangle is said to be scalable and can be implemented at a low cost, which could present a more advantageous database structure than a blockchain for exchanges across the Internet of Things.
IOTA whitepaper and explanation of the tangle here.
If we missed any consensus mechanisms, let us know below! We’ll cover each in a future edition of The Daily Bit and post the updates here.
That’s all for today!
If you enjoyed today’s Daily Bit, please clap up to 50x so that others can get their daily briefing as well. Thanks!
Where Else To Find Us: