Before you go, check out these stories!

Hackernoon logoMasterode/Proof-of-Stake: an overview of a new consensus protocol by@tanveerzafar

Masterode/Proof-of-Stake: an overview of a new consensus protocol

Author profile picture

@tanveerzafarTanvir Zafar


Masterode/Proof-of-Stake: An overview of A New Consensus Protocol

To the general public, blockchain networks like Ethereum sometime seem like a magical alternative to traditional payment systems: phrases like “free transactions” and “instant payments” are common. The reality is far less glamorous: Blockchains can be very slow, and transactions are far from free. However, a novel consensus mechanism known as MpoS might offer a promising solution.

Ethereum Woes

Ethereum’s introduction of smart contracts marked a revolution in the minds of the startup community: Now anyone could create and crowdfund an innovative project without dealing with venture funds, could accept and send money without banks, and could conclude risk-free deals. Indeed, a smart contract — a program that self-executes whenever a set of predetermined conditions are met — can be written for just about any deal. Unsurprisingly, hundreds of blockchain sprung up, all using Ethereum smart contracts to distribute their tokens (with the hope that future goods and services would be sold via smart contracts, too).

However, almost four year later, it is apparent to everybody that Ethereum has flaws — serious ones. The long-awaited transfer to PoS can still be years away, and a lot of promising projects find that running a complex dApp on Ethereum is time-consuming and costly. For instance, a platform with 2000 users, each of whom performs on average 2 transactions a day, would have to pay for 1 460 000 transactions annually if it wishes to offer zero fees. With the current average gas fee of $0.1 per transaction, that makes $46 000 — a hefty sum. To this cost we should add the lengthy block time of 12.5 seconds, which is surely a great improvement on the pre-Constantinople 21 seconds, but still far too long for time-critical apps. In short, if the mass adoption that crypto enthusiasts keep promising us is to become reality, a fresh solution is needed.

For a while, it seems that EOS could be that solution with its seemingly democratic community voting system that selects delegates who mine transactions. EOS transactions speeds broke records, almost reaching 4000 TPS at some point. However, for most aspiring miners EOS turned out to be a false hope of sorts: to run the official recommended server configuration, one needs to pay over $ 600 a day — almost half of the revenue of a popular node. It is not surprising that most EOS nodes are losing money.

Proof-of-Authority and Masternodes: Tackling the Problem from Different Angles

A very interesting solution could lie in combining Ethereum smart contracts, Proof-of-Stake consensus mechanism, and the concept of masternodes. In this case, the process of minting new blocks is similar to the Clique protocol used by the Ethereum test net Rinkeby. In Clique, each new block must be verified against a list of so-called signers. This list of authorized signers is dynamic, meaning that any signer can be voted in or out by the others. To make this democratic procedure possible, Clique uses the “nonce” field for voting and an enlarged “extradata” field for the miner signature. This consensus mechanism is known as Proof-of-Authority, and it can be considered a type of PoS, the difference being that a node’s mining power does not depend on the number of coins staked — rather, it comes from the community itself. PoA is a good way for the network to police itself and protect invidivual miners from the encroachment of large mining operations, at the same time reducing the risk of a 51% attack.

Where do masternodes come into this? Masternodes, which have become popular thanks to DASH, are special nodes that render valuable services to the community — first and foremost, they maintain an up-to-date fully copy of the blockchain in exchange for a fixed regular income. To run a masternode, a user must keep their server up and running 24/7 and have enough free space to accommodate the entire set of data (for instance, the Ethereum blockchain’s current size is circa 140 GB). A masternode must also stake a reasonable amount of coins to ensure that it will not risk its position and its stake by turning malicious. In many current realizations, masternodes do not themselves mine transactions — rather, they have the right to refuse a block if a miner abuses the rules. The income from a masternode is both stable and reasonably large, more than compensating for the cost of renting a VPS that is necessary for its uninterrupted operation.

In a hybrid masternode/PoA system a node would stake a certain limited number of coins to participate in block signing in return for a good share of the block reward. The list of signers would be dynamic, and each authorized masternode would have equal chances to mint a block, as opposed to the standard PoS situation, where users with the largest stake have a distinct advantage. At the same time, malicious nodes could still be removed from the list (de-authorized) by a general vote of other signers.

Masternode/Proof-of-Stake: Towards a Convergence

The only hybrid masternode/PoA system that is currently live is the one launched by EtherZero in August 2018. At present, it features over 200 masternodes, each of which has to stake roughly $2000 (at the current ETZ/USD price) to launch a masternode. 75% of all block rewards are allocated to masternodes.

A peculiarity of the system is a parameter called Power — a non-traded token that is automatically generated by all masternodes and is used to pay transaction fees in the network. The amount of Power produced by an account depends on its balance, and it’s thanks to Power that the network can offer zero transaction fees. The current capacity is circa 1400 transactions per second with an average waiting time of about 1 second. EtherZero is fully is fully backwards compatible with all Solidity smart contracts. As part of the testing process, the developers successfully imported a wide range of projects, including decentralized exchanges, token emission contracts, investment apps, and games.

Can MPoS prove to be a viable alternative to Ethereum? The next several months will most likely tell. True, there is only one fully functional experiment running right now, albeit offering zero transaction fees and a high processing speed. On the other hand, with the issues of Ethereum clearly not solved by the recent updates, dApp developers might take a closer look at the hybrid consensus options out there.


The Noonification banner

Subscribe to get your daily round-up of top tech stories!