Proof of Activity Explained: A Hybrid Consensus Algorithm

Last updated: Mar 30, 2023
9 Min Read
AI Generated Summary
Summary
Summary

Cryptocurrencies are becoming increasingly popular and mainstream, thanks to the role they’ve played already in decentralizing everything from finance to publishing to transportation; with many other industries also seeing some sort of blockchain and cryptocurrency in its future.

While decentralized public ledgers have been groundbreaking, and have every chance to significantly change the world as we know it, the one thing every blockchain has in common is a secure, functional and efficient consensus algorithm.

Of course, there’s more than one way to skin a cat as they say, and there’s also more than one way to build a consensus algorithm.

It Began with Proof of Work

Proof of Work Mining  

The most common consensus algorithm, and the one that gets the most discussion, is the Proof-of-Work (PoW) algorithm used by Bitcoin, and many other cryptocurrencies. The proof of work does two things for the Bitcoin network. It ensures that each successive block is the one true and accurate block, and it maintains the blockchain in a consensus state, avoiding potential forks from strong groups who may not have the best interests of the coin in mind.

In a proof of work consensus the miners on the network all compete to be the first to complete an extremely difficult cryptographic puzzle. When they are successful they get to add the next block and set of transactions to the blockchain. For their efforts, they receive a set number of Bitcoin as a reward, as well as the transaction fees associated with that block. Currently that number is 12.5 Bitcoin, and it is halved roughly every 4 years.

It’s a genuine masterpiece of technology, but it isn’t perfect, nor is it necessarily foolproof.

One of the most common criticisms regarding Bitcoin is the vast amounts of resources (namely computational power and electricity) that are consumed in mining Bitcoin. It is also well known that the Bitcoin network does not scale well, allowing only 7 transactions per second, and creating a new block only once every 10 minutes. Finally, there are issues with centralization in Bitcoin, as most of the hashing power in the network is held by a small number of miners, or collaborative mining groups

Bitcoin was the first blockchain, and it presented us with the possibilities inherent in a decentralized public ledger. That doesn’t mean it was ever meant to be perfect, or that there don’t exist better ways of enacting a consensus algorithm. Ways that are less resource intensive, more scalable, and less prone to unintentional centralization

Introducing Proof of Stake

 Proof of Stake Mining  

Proof of stake (PoS) is the most commonly used consensus algorithm after proof of work. Peercoin was the first coin to implement proof of stake, followed by Blackcoin and NXT. Ethereum currently relies on proof of work, but is planning a move to proof of stake in early 2018 called the "Casper Protocol".

Proof of stake solves the resource usage issue, because it does not use miners to solve complex puzzles. Instead it uses validators, or entities who hold coins (a stake in the system) and are able to prove transactions and blocks based on their “stake” in the system.

In the proof of stake, the validators are paid only the transaction fees of the network, there are no mining payouts. The chance of being selected to create the next block in the chain is dependent on the amount of coins held by the validator. More coins means a greater change to be chosen. So, a person with 5,000 coins is five times more likely to be chosen to create the next block versus someone with 1,000 coins.

Once the block is created it is then committed to the blockchain, typically by having some system to sign off on newly created blocks. There are different ways to handle this, but they are all subject to the same problem.

How do we stop a validator from creating two blocks when chosen and collecting two sets of transaction fees? And for that matter, what’s to stop a signer from signing both blocks? This problem is known as the “Nothing-at-stake” problem. Basically it means that a person who has nothing to lose has nothing to keep them from behaving inappropriately or badly.

One solution to this problem is to lock away the staked coins. If a stakeholder then tries to create two blocks, or tries to fork the blockchain these locked coins can be burned.

Proof of stake consensus also suffers from a type of centralization whereby early adopters typically have a much larger “stake” in the system than those who come later. This means they get a larger share of block creation fees, which often deters newcomers from building a “stake” in the system themselves.

Proof of Activity – A Hybrid Approach

The Proof of Activity approach was recommended in a paper written by four authors – including Litecoin Creator Charlie Lee – and was published in December 2014 in the ACM SIGMETRICS Performance Evaluation Review newsletter. As stated in the abstract: 

We propose a new protocol for a cryptocurrency, that builds upon the Bitcoin protocol by combining its Proof of Work component with a Proof of Stake type of system. Our Proof of Activity protocol offers good security against possibly practical attacks on Bitcoin, and has a relatively low penalty in terms of network communication and storage space. 

The proof of work protocol was created to avoid a potential problem called the “tragedy of the commons” in Bitcoin, whereby miners begin to act only in their own self-interests, ruining the otherwise secure system. It has been theorized that this can occur for Bitcoin once the mining rewards are gone (after all 21 million coins have been mined), or potentially even sooner as rewards become increasingly smaller and miners are basically only receiving transaction fees.

In the proof of activity as suggested in the 2014 paper, mining first begins in the traditional manner, with miners vying to be the first to solve a puzzle and claim their reward. The difference is that the blocks being mined do not contain transactions. They are simply templates with header information and the mining reward address.

Once this nearly blank block is mined, the system switches to a proof of stake protocol. The header information is used to select a random group of validators to sign the block. These are coin holders (stakeholders) and the larger the stake a validator holds, the greater the chance they will be selected to sign the new block. Once all the chosen validators sign the block it becomes an actual part of the blockchain.

If the block remains unsigned by some of the chosen validators after a given time, it is discarded as incomplete and the next winning block is used. Validators are once again chosen and this continues until a winning block is signed by all the chosen validators. The network fees are split between the winning miner and the validators who signed the block.

Is Proof of Activity Better?

Proof of activity has been criticized as it still requires a fairly large amount of resources for the mining phase. It has also been suggested that there remains nothing preventing a validator from double signing.

One factor that does make this system more secure is the probability of a 51% attack drops nearly to 0% as a successful attack would require the same individual or group to both control 51% of the mining hashrate for the PoW AND a majority of the coins in the system for the PoS.

Some have assumed that this hybrid of proof of work and proof of stake was simply a transitory period as a coin switched from one protocol to the other, but this is false as proof of activity is an actual consensus algorithm in and of itself, created specifically to increase the security of Bitcoin or similar cryptocurrencies.

Who Uses Proof of Activity?

Currently there are only two coins I was able to locate that use the hybrid proof of activity protocol. Decred is one and Espers is the other. Both use a variation on the proof of activity, where each block uses either PoW or PoS.

Staking remains active whenever PoS is being used, and becomes inactive for those blocks that are selected as PoW. In terms of market pricing, Decred (DCR) has seen much better performance when compared with Espers (ESP), and seems to be further along in development as it includes support for smart contracts, atomic swaps and the Lightning Network.

In Conclusion

To protect from the possibility of a 51% attack, the proof of activity protocol seems like a good choice. It offers the benefits of both of the most utilized consensus algorithms, and the hybrid is more secure than either separately.

The downside is that while proof of activity provides the benefits of both proof of work and proof of stake, it also comes with the downsides of both – that is heavy resource usage and the possibility of a stakeholder attempting to double sign transactions.

Even so, only two coins to date have chosen to use proof of activity, indicating it is either difficult to implement or it doesn’t provide enough benefits to outweigh the downsides. Decred is the best example of this consensus protocol in use, and it is itself a hybrid of the hybrid.

Yet it seems to be doing well in the market, as it has held up well in terms of USD pricing, and even better when compared to BTC. And it is the 41st largest coin by market cap as of early April 2018 as measured by Coinmarketcap.com, indicating it does have a strong community behind it.

Steve Walters

Steve has been writing for the financial markets for the past 7 years and during that time has developed a growing passion for cryptocurrencies.

Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.

Previous article
DAOStack: Everything you Need to Know About Blockchain Governance
next article
Canadian Government uses Ethereum Blockchain for Transparency