Proof-of-Stake Consensus Mechanism

The power of cryptocurrency is not just security and decentralization. It is also due to what is called the consensus mechanism, which allows participants called nodes in a decentralized system to come to an agreement to validate the truth on a blockchain. The most popular is the consensus used in Bitcoin, called PoW (Proof-of-Work) which requires mining to create coins on the network. Although it has been tried, tested and proven true, it has issues with scalability and sustainability. Although mining is reliable, it can be energy intensive to participant nodes because it requires plenty of computing resources (hash rate) to solve cryptographic puzzles to add a block to the blockchain. That translates to larger electric bills and thus will not be ideal for payment systems that require mass volume transactions that need to be processed daily 24/7/365. It is also slow because in a blockchain, the data is sent to all nodes rather than just one server processing the transactions. It had its limitations called out by developers, thus leading to other consensus mechanisms that used more efficient algorithms that also increase the transaction velocity on the network.

This is why a new type of consensus mechanism was developed called PoS (Proof-of-Stake).

What is PoS?

This is not the same as Point-of-Sale, that is a totally different system for payments. Proof-of-Stake is a consensus mechanism algorithm that requires no mining to validate transactions and create blocks. Instead it requires to stake a certain amount of funds to become validators on the network. These funds are a % of the total coins that exist on the network.

Let f = fund staked as %, Ts = total supply of coins, Ta = total amount staked

f = (Ta / Ts) x 100

PoS and variations of it are being used in cryptocurrency like EOS, Tron, Tezos and soon it will be implemented on the Ethereum network.

When you are mining for blocks using PoW, like in Bitcoin, you must compete with other nodes called miners in order to validate blocks. This is done by trying to solve what is called the nonce which is a value (based on a difficulty target) that contains a hash of numbers. The value is either less than or equal to the nonce, and must be discovered by miners within an average time of 10 minutes. The miner who is able to compute the nonce first becomes the block validator who creates the blocks and in return receives Bitcoins as a reward.

On PoS, there is no need to compete with other nodes to solve a cryptographic puzzle. Instead, there are a set number of nodes called stakers who will help validate transactions. In some systems, like in a delegated PoS network, token holders can vote for block validators (called producers in EOS) who have staked a large investment into capital resources (e.g. data center, servers, etc.). The code than provides a time when block validators will create blocks and in return they will receive their reward in the cryptocurrency’s tokens.

If we have two staking nodes called f1 and f2:

If f1 = (Ta / Ts) x 100 > f2 = (Ta / Ts) x 100

This means f1 will be the block validator based on what was staked or weight of their % of coins.

Here is one example of PoS. According to Ethereum founder Vitalik Buterin from his blog:

The simplest formula for this (PoS) is:

SHA256(prevhash + address + timestamp) <= 2^256 * balance / diff

prevhash is the hash of the previous block
address is the address of the stake-miner
timestamp is the current Unix time in seconds
balance is the account balance of the stack-miner 
diff is an adjustable global difficulty parameter

“If a given account satisfies this equation at any particular second, it may produce a valid block, giving that account some block reward.”

The idea behind PoS is to encourage honest participation among trustless participants using game theory. You cannot know for sure who is acting on good faith or who is the bad actor. Thus, the idea of putting your own funds as a stake to being a validator is what shows your willingness to help in the network. Otherwise, that participant will lose their staked funds if they become dishonest or try to attack the network. The consensus among all nodes can deny the participant’s block if they attempt to cheat. They either lose their stake or get rejected from the network and even blacklisted. It all comes down to the protocols of the digital governance on the network, something that is a feature of PoS systems.

Another thing to note is that PoS is also based on the weight or amount a node has put at stake. Therefore, the more funds you stake the better your chances are for becoming a block validator. The validators can be chosen by random selection or voted by the token holders as mentioned earlier. This process is much faster to resolve than the 10 minute block propagation time in Bitcoin’s PoW because it requires no mining to solve for the nonce. It can actually be more instantaneous since the selected block validator can process the transactions and create the block which then updates all nodes on the blockchain. Much faster than having all nodes try to validate the block at the same time by discovering a nonce. This allows for faster transactions speeds that are more suitable for micropayments and retail transactions i.e. buying a cup of coffee with cryptocurrency.

This consensus mechanism is also more energy efficient. Producing a block on the network doesn’t require expending a lot of electricity like in Bitcoin. This saves not just costs, but also time. This has been the main argument for PoS among its proponents.

Despite its more refined algorithm, there are also issues with PoS. The following will discuss some of the well known issues.

Stake Inequality

If you are to look at the algorithm, it favors wealth. Critics argue that in a PoS system, those with more at stake or resources available will surely always come out as the validators. This is not exactly fair, and can lead to a sort of network oligarchy which can control the blockchain. If this is the case, what have PoS developers done about such issue?

To make sure that things are fair, code was written to randomize block validator selection that is still based on the amount at stake. This means that anyone who is staking is likely to get selected based on how much they have staked. When the load of transactions is even greater to process, a node that has staked more will likely become the validator because their stake can prove that they have the resources available to create the block. Now the argument against this is that it still shows that it will be favorable only to those with higher incomes. They can even collude to become block validators based on their stakes and collect all the fees from transactions. This creates a barrier to entry that limits decentralization. This then can lead to centralization, which is what blockchains are not supposed to be.

Centralized Validators

Centralization is indeed counter to the ideology of a blockchain. In order to prevent only a few validators from ever gaining control of the network, different methods have been developed.

Here are some of those methods:

  • Randomized Selection – This will ensure that validators who have validated before will not be the only validators. Instead the algorithm will randomly select a new validator each time. A validator who has validated before will get their chance again in the future. Some networks will actually allow for x number of validators only, while others can allow for unlimited numbers of potential validators.
  • Elections – Other cryptocurrency use digital elections or delegated PoS (e.g. EOS and Tron) to determine who the block validators will be. In EOS they are called Block Producers, while in Tron they are Super Representatives. The network allows all token holders with voting rights to ‘freeze’ funds for candidates to become validators. In EOS 21 are elected while in Tron it is 27. This appears to be a smaller number of nodes, but the logic behind this is that although it is less decentralized, it helps to scale up processing for faster transaction processing. The network can then call for a new round of elections to select new validators to make sure that it is not too centralized.
  • Time Allotment – In this scheme, anyone who has staked joins a queue to become a block validator. It will be a fixed amount, and so the system is not based on who has staked the most. The node will then wait for their turn to become a block validator. The problem with this type of scheme is if anyone can validate, how can we be sure they have the resources to do so? What if they are using only a low end PC or just their smartphone? Will that be enough compute power to create blocks? In this case, such a system can work for nanopayments or even non-compute intensive micropayments that use smaller block sizes. All the node needs to do is add the block after the consensus has determined it is valid. In return the node receives their fees.
  • Validation By Delegation – In Tezos this is the PoS scheme, called Liquid PoS. In this system, a validator can delegate their validation rights to other validators on the network. This is done using a process called baking. The node called a baker has block producing rights based on their stake. This model is more or less a way of sharing the rewards. This is because by process of validation by delegation, the baker can delegate production to another baker without transferring their ownership of stake. Instead they keep the stake and get rewards which they then share with the delegated baker. This works well if the baker has a good reputation and integrity on the network.

Network Attacks

The problem with centralization is that a rogue node can accumulate a majority of the cryptocurrency’s tokens. If they were to gain 51% of the coins and stake them on the network, that can lead to attacks. Now the question is, does that even make sense? It definitely requires a lot of investing into the cryptocurrency to have a majority hold on its coins. This is also called the 51% Attack and it can also be possible of PoW systems.

f = (Ta / Ts) x 100 = 51

In a post made on the Qtum blog:

“In PoS, after a rollback, the attacker address can be blacklisted and those coins simply ‘deleted’. This would make the remaining coins in the system go up in value and the attacker would have to repurchase the coins in an effort to relaunch the attack. This is especially risky for them if they were shorting the coins, as they no longer have access to them and have to pay back the lender.”

In this case it would make things more expensive to attack the network so it discourages bad actors. As of this writing (September 2019), there has never been a successful attack on a PoS blockchain that demonstrates this example.

Nothing At Stake

The Nothing At Stake theory is a problem that arises on the blockchain due to its distributed nature. This type of attack can delay and complicate transactions on the network. Staking is a process that adds value to the network. What is being staked is actually the % of coins that a user has of the total supply. It is thus in their best interest to make sure that the network is secured, otherwise they will lose their value. This incentivizes the node that stakes to behave honestly or else risk devaluing their network.

This problem can occur when there is a fork or series of forks on the network. A fork is another chain that forms from the main network during a contentious moment in which the network becomes split. One network supports one block while the other half refuses to go along with it. This also occurs when there are simultaneously two block validators trying to produce a block for the network. During a fork, a node can put their stake on both chains because they have nothing to lose from it. This type of behavior is not exactly approved by consensus.

The node can get away with it though. This is because the node will get their reward no matter which chain wins. This can lead to what is called a double spend. The node that has put a stake on both chains loses nothing because they will get their reward from the chain that wins. Now imagine if all nodes followed this lead. It makes two chains exist at once, which means there is really no main network. The node has nothing at stake because they don’t incur any costs to doing this.

This makes the network less secure and prone to more discrepancies. One of the chains can overtake the other, and any bad transaction on one chain is considered good on the other chain. Thus, a node has nothing to lose since the eventual chain that wins will reverse any bad transactions they had on the failed chain. The node collects fees no matter which chain they are on, and this can lead to many inconsistencies on the blockchain.

To address this issue, developers have come up with mechanisms that prevent or discourage this. To explain in simple terms, when the network detects a node attempting a nothing at stake attack, they will be reprimanded. The consequence is that the node will lose their stake, which is something to lose. This encourages honesty among the nodes because of the penalty of malicious intent to the network.

Critical Factors

A great feature of PoS is to allow more participation among token holders and involve the community when it comes to consensus. However a cryptocurrency chooses to implement their PoS protocols, the thing to remember is that this is an alternative option to PoW. The benefits are clear, but there are also issues that need to be addressed. Some have tried to implement a hybrid PoS and PoW system to reap the benefits of both consensus mechanisms. Overall, these systems will eventually mature and develop over time, so there is plenty to observe once they have been in production.

Stablecoins – Stability In A Sea Of Volatility

The cryptocurrency market is highly volatile. That is the main risk involved due to the speculative nature for cryptocurrency. Price changes can suddenly shift in a matter of seconds. A typical phenomenon observed in the market is called “pump and dump”, and involves a large injection of capital followed by a large outflow of it as well. This is an example of market manipulation, often carried out by investors called “whales”, who have large funds that can influence the market.

Since there is little regulation and lack of clarity in this space, it is really hard to control how money moves in and out of the market. Price valuation depends on the market cap that is the total capital of the cryptocurrency asset. The idea here for most investors is a future return of value, which is typical of a security. However, cryptocurrency are meant to be a form of payment or medium of exchange which has utility. It is supposed to be a currency like the US Dollar or the Euro, but speculators are treating it as a valuable asset. In other words, most cryptocurrency especially Bitcoin, are being treated as a store of value. Investors are “HODling” or holding on to them with the expectation of higher values in the future.

The problem with holding is the price volatility of cryptocurrency assets. The market shifts and swings, with 100% gains getting wiped out in seconds. Those who continue to hold are using a long term strategy but traders who go short will often lose more money than they expect. There is actually a solution to avoid the price volatility in the market for traders. Enter stablecoins, a cryptocurrency that is pegged to the value of fiat currency.

The best and oldest example of a stablecoin is Tether. The token is named USDT and is pegged to fiat currency like the US Dollar, Euro and Japanese Yen. This provides price stability for traders who want to keep their funds in the cryptocurrency market without the volatility of price swings. It makes sense to keep USDT as a trading pair with the top cryptocurrency in the market. Traders who hold USDT, don’t have to undergo any conversion at exchanges from fiat to cryptocurrency any longer. This will cost traders more money because of the associated fees with exchanging between fiat and cryptocurrency. With USDT, traders can conveniently hold their cryptocurrency assets without being affected by price swings since the USDT token is always pegged one to one to the US Dollar, etc. Since USDT has existing trading pairs with many cryptocurrency it is much simpler to trade on digital exchanges.

The complexity of moving large amounts of money from a bank to a digital exchange and vice versa, is in itself a hassle. Not to mention the scrutiny and the fees involved. Traders who have to convert fiat from their bank back to cryptocurrency to trade on exchanges are also incurring a loss because they could miss the moment to trade because of the process involved. A trader will be able to trade faster by just holding a stablecoin like USDT which they can convert and pump back into the market with an order book on digital exchanges.

According to Wikipedia, a stablecoin is:

“… designed to minimize the volatility of the price of the stablecoin, relative to some “stable” asset or basket of assets.”

The basket of assets can include precious metals or even other types of cryptocurrency. In the case of Tether, 1 US Dollar is supposed to back each USDT token issued. Maintaining that price point requires auditable proofs, which stablecoins must be able to provide to regulators.

Stablecoins even have a practical business application not just for traders, but for businessmen and financiers. Moving money across borders with cryptocurrency is actually faster and much simpler than using a bank of money transfer service. It does however, circumvent jurisdiction laws and that is the issue with transactions like this. There have also been criticisms that stablecoins may not actually have the fiat reserves to back their cryptocurrency. This has been the controversy with Tether. It is more a lack of transparency in their financial information that has regulators investigating.

Another issue that seems to beg scrutiny are how centralized stablecoins are under their respective companies. Most all stablecoins – Tether, Paxos, Gemini, TrueUSD – were developed by a company. Though they use a blockchain-based digital ledger technology, their governance and business process is not truly decentralized. They still make money from fees, but what if the government or a certain jurisdiction shuts down the company for non-compliance to regulations? What happens to the stablecoin holders? Digital exchanges can choose to blacklist the stablecoin token, and this would be disastrous for holders who have plenty of them to exchange. Stablecoins may also lead to an increase in the supply of money leading to inflation that is pegged to a national currency. That is another possible problem that stablecoins could introduce or exacerbate.

There are hurdles and many regulatory clarity questions regarding stablecoins. They can eventually lead to greater adoption with further cooperation with jurisdictions and regulators. Even Facebook and Walmart are planning to release their own cryptocurrency that uses a stablecoin. This can impact the mainstream since those are two of the world’s biggest companies. The potential is there, so it is just a matter of how they will be regulated and how companies who issue them will be able to comply. Stablecoins are beneficial to the cryptocurrency market as a whole. Whenever USDT trading volumes are high, it usually correlates to more trading activity of cryptocurrency assets like Bitcoin. Digital exchanges like Huobi and Binance reported 40-80% of transactions use USDT. It is also originating from China, where traders are using stablecoins like USDT to avoid banking restrictions (From article “Why Tether Volume Is At All-Time High” on Coindesk).

A Cointelegraph article “Stablecoins to Play Key Role in Crypto Adoption, Says New Report” states that stablecoins will have a key role in cryptocurrency adoption. This is optimistic news for stablecoins as they aim to address market volatility in cryptocurrency and hyperinflation with fiat currency. Countries with a high inflation rate can adopt stablecoins to stabilize their funds as a sort of safe haven, though this has not yet been seen on a proven scale. There are plenty of new projects being mentioned now that have the use for stablecoins. It could possibly draw the attention of institutional investors. The stability it can bring to a volatile market is what makes it an attractive solution for trading and perhaps even investing.