Ducketts Mead



Proof Of Stake

March 03, 2018

Proof Of Stake Selection Algorithms

Randomised Selection

In this article we will look at a different consensus protocol called proof-of-stake, and see how it differs from proof of work.



Proof Of Work Drawbacks

One of the drawbacks of the proof-of-work consensus protocol is that it’s inefficient all the nodes are competing with each other to solve the cryptographic hash puzzle, but only one of the node’s work actually ends up on the blockchain. When one of the nodes mines a valid block, all the other nodes must abandon all the work that they’ve done so far and move on to calculating the next block’s proof-of-work.

All this wasted computation consumes a lot of electricity  and is detrimental to the environment. In recent research, experts argue that bitcoin transactions may consume as much electricity as Denmark by 2020

Proof Of Stake

Also, proof-of-work is slow to reach consensus, which limits the network throughput. Proof-of-stake is an alternative consensus protocol to proof of work that solves some of these issues. Proof-of-stake works similarly to proof-of-work, but without the wasted network computation. It works in the following way, any node that wants to participate in the creation of a new block must put down a stake or deposit, and join a pool of miners. The larger the stake, the higher the chance of being selected to mine the next block. It’s similar to proof of work, with a  larger computation power you have, the higher your chance of successfully mining a new block. Hence, proof-of-stake is sometimes called virtualised mining, or virtualised proof-of-work. If a miner is malicious and tries to double spend, they would lose their initial stake as well as their privilege to be part of a mining pool. The question is, how does the network select a miner from the pool of miners?

There are a few different selection algorithms available, and hence many different flavours of proof-of-stake. One example is the randomised selection algorithm, where a formula is selected to choose the miner based on the stake they’d put down and some hash value. Since all stakes are public, each node can usually predict which miner will be selected to create the next block.

Another selection algorithm is coin age based selection. This algorithm selects a miner based on a combination of random selection and coin age. Coin age is computed by multiplying the number of coins put down as  stake and the number of days that stake has been deposited. Usually, a miner must put down a stake for at least 30 days before they can be eligible to be selected. Once a miner is selected, and mine a block, the age is reset to zero, and they must wait another 30 days again before they can mine. This system promotes a healthy and decentralised mining community and gives everyone a good chance to participate.

One advantage of proof-of-stake, besides saving on electricity cost, is that it’s more secure when compared to proof-of-work. In the sense that it’s harder to acquire 51 percent of the supply of a cryptocurrency in a blockchain, than it is to acquire 51 percent  of the computational power. This is because in a proof-of-stake system, if you have  percent of the total supply of the cryptocurrency, then you only have a 1 percent chance of being selected to mine, assuming that every node in the network is participating in mining. Therefore, this makes a 51 percent attack much, much more expensive compared to proof-of-work because you can lose all of your 51 percent stake, whereas in proof of work, if you have 51 percent computation power, you don’t lose that hardware. In addition, depending on the precise algorithm used in proof of stake, it can potentially allow for a much faster blockchain. There’s some disadvantages to proof-of-stake as well, such as the nothing-at-stake problem. But that is beyond the scope of this particular article.

Now that we know how consensus works on a blockchain, now we are ready to dive into the economics of why it works. This will follow in my next article about this matter.

Thanks to Niloo Ravaei.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s