Home

Cryptocurrency Mining and Proof of Stake Algorithms

|
|  Updated:  
2021-07-02 20:53:59
Investing in Cryptocurrency For Dummies
Explore Book
Buy On Amazon
Cryptocurrency mining has changed significantly since its inception. Newer cryptocurrencies are breaking from the old ways of PoW (proof of work) algorithms and using Proof of Stake instead.

In the early days of cryptocurrency, PoW was the only game in town, and new cryptocurrencies primarily copied Bitcoin as the model and a starting point for their slightly different ideas and implementations.

Over time, however, some involved in cryptocurrency recognized the downsides to PoW and set out to find a better way of securing a cryptocurrency, soon settling on POS — proof of stake.

The idea is to make miners stake their cryptocurrency as an entry ticket for adding blocks to the blockchain and earning transaction fees. The penalty for adding invalid transactions to the blockchain ledger would be loss of the coins staked. This was first proposed in 2011 by a user of the Bitcointalk.org forum.

In 2012, the whitepaper for Peercoin, which expounded and solidified this idea, was published, describing a new system for securing and reaching blockchain consensus that was much less resource intensive than pure proof of work. (While Peercoin is technically hybrid proof of stake/proof of work, this marked the first real world implementation involving proof of stake.)

Today, proof of stake, along with its hybrid use (hybrid proof of stake/proof of work), helps secure and maintain trust for a few somewhat successful cryptocurrencies. While still considered the more unproven of the two main consensus systems, proof of stake has some benefits over proof of work. proof of stake should be understood by any cryptocurrency miner worth their salt. (And you can potentially profit it from it, too!)

Proof of stake explained

Proof of stake is similar to proof of work — it’s used to maintain consensus and keep the cryptocurrency ledger secure — but with one major difference: There’s way less work!

Instead of using a specialized mining rig to calculate a targeted hash, a miner who wants to create a new block chooses to stake an amount of the cryptocurrency they want to mine. Staking can be thought of like making a refundable deposit, and the purpose behind its requirement is to prove that you have a vested interest in the welfare of whatever cryptocurrency you’re mining.

In other words, before you can mine the cryptocurrency, you must prove that you own some of it, and you must stake it during the mining process; that is, you can’t just show you own it, sell it, and continue mining. The stake is locked during the mining process.

As with Bitcoin, a miner has to be selected to add transactions to the blockchain; one miner wins the contest. Different cryptocurrencies use different methods for making that selection, but whatever method is used, that selection is made, and the lucky miner is chosen to create and chain a new block of transactions, collecting all of the transaction fees from this new block.

The nice thing is, the block being chained can be less computationally expensive and thus created by any computer capable of running that cryptocurrency’s node software, if an adequate amount of cryptocurrency is staked.

This, in effect makes most computers capable of functioning as proof-of-stake miners. The catch is that blocks are rewarded proportionally to the amount of coins staked, making for a less even coin distribution among miners in comparison with proof-of-work-based systems.

It’s important to note that fewer block rewards are to be won in proof-of-stake cryptocurrencies, as the vast majority of coins issued are generally pre-mined up front prior to the currency’s genesis block.

The lack of work required to mine a proof-of-stake crypto, along with the fact that there are minimum mining rewards besides the transaction fees, has given rise to the terms minting or forging being used to describe this process rather than mining.

At the end of the day, though, proof of work and proof of stake attempt to serve the same purpose: Ensuring everyone in the network agrees that new transactions in the latest block are valid, and properly chaining them to a cryptocurrency’s blockchain record.

Proof-of-stake selections

In proof-of-stake systems, you have to prove that you own a certain amount of the currency you are mining; you have to put up a stake to play the game. Different currencies have different PoS mechanisms, of course, but here are the basic concepts.

First, before you can play the game and have a chance of becoming the miner who adds a block to the blockchain, you need a stake. You have to have some of the cryptocurrency in your wallet, and, with some currencies, it has to have been there for a certain amount of time.

Peercoin, for example, requires that the currency has been sitting in the wallet for at least 30 days. Other currencies, though, don’t have this limitation. Note, however, that in some systems, while staking your currency can’t be used; it’s locked up in your wallet and may be locked up for a specified minimum time, and in fact if you attack the system in some way you stand to lose the stake. In other systems, this isn’t the case; merely having currency in your wallet is enough to count as a stake.

Some PoS systems have a concept of coin-age. That is, you multiply the number of coins in the wallet by the time they have been in there. A miner who holds 10 coins that are 60 days old (10 x 60 = a coin age of 600) will have a better chance of being selected than one who holds 5 coins that are 90 days old (5 x 90 = a coin age of 450).

There may be minimum and maximum lengths of time for the coins; in Peercoin, the coins must have been in the wallet for at least 30 days, but coins in the wallet that have been there more than 90 days are not counted. (This is to ensure that the blockchain is not dominated by very old or large collections of coins.)

Also, the miner who wins has the clock on the staked coins restarted; those coins can’t be used for another 30 days. Blackcoin has a simpler concept; your stake is simply the amount of the cryptocurrency in your wallet that you have assigned as your stake.

But the stake is not enough. If miner selection were based purely on the coin age of the stake, the richest guy would always win, and would add the block to the blockchain every time.

So PoS systems must have some element of random selection. The staked coins, or the coin age of your stake, determines how many tickets you buy in the lottery, but the winning ticket still has to be selected through some kind of random selection, and different PoS cryptocurrencies use different methods.

More tickets owned (a higher coin or coin-age stake) means your chance of winning is greater, but through chance even someone with a fraction of your stake may win.)

As Blackcoin says (Blackcoin.org), “Staking is a kind of lottery. Some days you'll get more than usual, some days less.” Blackcoin uses a randomization method that is a combination of a hash-value contest and the coin stake; miners combine the amount of stake and the staking wallet address, and the miner with the most zeros in front of their hash wins.

The richest and longest-owning cryptocurrency miners typically have an advantage for winning the right to create new coins and chain blocks into a PoS blockchain. In fact, as Blackcoin explains, “If you stake with more coins, you get more blocks and you are more likely to find a reward. Someone staking 24 hours a day, 365 days a year would get more (~24x) than someone staking the same amount of coins an hour a day.

Over time, stakers earn Blackcoin in proportion to the amount of money they stake and how long they stake it, and in general that’s true of all simple PoS systems.

PoS example cryptocurrencies

There have not been many successful examples of cryptocurrencies deployed that use pure proof of stake; most deploy a hybridized approach. However, a couple of noteworthy blockchains have used this technology for a consensus mechanism:
  • NXT was created in 2013 and deployed using a pure proof-of-stake implementation. Today, it is not widely used, but still in existence.
  • Blackcoin is a cryptocurrency that was released in early 2014 and also functions on a pure proof-of-stake consensus mechanism. Again, it’s a relatively small cryptocurrency by value and not widely used.

Upsides to proof of stake

The most obvious upside to proof of stake is the reduced energy consumption when compared to proof of work. Rather than consuming the same amount of electricity as a small country, under proof of stake, the blockchain can be managed with significantly less energy.

The scalability under proof of stake is also greatly increased. While Bitcoin and similar proof-of-work cryptocurrencies struggle to get double digit transactions per second on the main chain (Bitcoin is around 8), by utilizing proof of stake, the transaction capability can get into the thousands or even hundreds of thousands per second depending on the number of validating nodes being utilized (the fewer, the faster generally).

With the reduction in cost to those who want to validate a proof-of-stake cryptocurrency, the transaction fees are also correspondingly lower. Miners don’t have to purchase expensive mining rigs, so creating blocks can be accomplished at a lower energy and equipment price.

While this does impact overall revenues for miners in proof of stake, the relative ease to start mining and low overhead cost still make mining proof-of-stake cryptos a viable option for those that want to experiment. And don’t forget, more transactions per second also means more fees per second!

Downsides to proof of stake

The stakes are high when it comes to securing a cryptocurrency and maintaining consensus. In a purely proof-of-stake system, two main issues cause concern.

The first is the problem of originally distributing a new PoS cryptocurrency. Some cryptocurrencies have both premined coins, and, once the network is running, mined coins.

Frequently most of the cryptocurrency in circulation, for many PoS systems, is premined, which creates a large barrier to entry to miners who want to get involved later. If you want to mine, you have a huge advantage if you already have large amounts of the cryptocurrency to stake right from the beginning.

And the more centralized ownership is, the less distributed trust the network has due to the ability of large holders to vote selfishly using their coins, to propagate a chain history that most benefits the larger coin holders. This could result in manipulation of the blockchain ledger to the advantage of the large coin holders, such as double spends, selfish issuance, and upgrades that go against the best interests of other users.

The second problem with pure proof of stake is called “nothing at stake.” This is a theory that says in PoS systems, validators (miners) are not interested in consensus, because it may be in their financial interest to add invalid blocks to the blockchain, leading to forks in the blockchain, creating multiple chains.

That is, if one validator adds an invalid block, other crypto miners may accept it and build on it, because they will earn transaction fees on whatever chain wins. (And because it’s a PoS system, it doesn’t take much computational power to do so.)

This leaves open the possibility of the blockchain being manipulated by those that hold the largest stake in that system, which is the opposite of the very purpose of cryptocurrency, which was to eliminate the idea of the traditional banking system and its centralized and manipulatable ledger system.

Under proof of work, this issue would be resolved quickly, as the miners are incentivized to quickly resolve which fork of the blockchain to follow so precious mining rig resources are not wasted.

The invalid block is orphaned, meaning that no new blocks will be built on top of it, and business continues as usual with only a single blockchain. Under proof of stake however, it is very easy to continue building new blocks on each chain, and in theory, the blockchain could easily fork.

There is a negligible cost to validating multiple chains, and if that occurs, the decentralized consensus mechanism has failed. With proof of work, chain reorganizations occur naturally as orphaned blocks, also known as uncles, have their transactions placed back into the mempool and, regardless of which chain tip becomes confirmed eventually, the transactions and blockchain maintains validity.

About This Article

This article is from the book: 

About the book author: