Giant Proof-of-Stake
By: Giant Project
Tags: Blockchain, Bitcoin, Smart Contracts, Cryptocurrency, Proof Of Stake

Our recent move to the Proof-of-Stake consensus algorithm has provoked a lot of questions from the community. While we have already explained the defining attributes of PoS in the previous materials, yet some properties of our own model still need to be clarified. In this article you will get a better understanding of the Giant consensus, who are ‘stakers’, how they get the staking reward, how it differs from the masternode rewards and some new useful Giant CLI console commands.

What is PoS?

The Proof-of-Stake is a network consensus. All network nodes use the same rules for transactions validation and the blockchain blocks verification. In the PoS network, the most likely participant to form a new block is the one who has a bigger coin stake.

You can see this principle implemented in Giant in the kernel.cpp file in our GitHub repository. The method called stakeHash calculates the hash of the stake, while the method called stakeTargetHit defines the right of the current stake to be accepted by other nodes in the network.

hashProofOfStake < bnCoinDayWeight * bnTargetPerCoinDay

This formula means the following. If the calculated stake hash is lesser than the multiplication of the stake size by the network difficulty inverse, then the network will accept the block created by this stake, and the stakeholder (staker) will get a block reward. The more difficult the network is, the lesser the bnTargetPerCoinDay parameter becomes — it’s a reverse proportion.

This means that the staker can influence his/her own reward only by the stake size. The bigger the stake size is, the more probability of the aforementioned block reward conditions to be met. This exact model has already been implemented in PIVX and ppcoin even before Giant was born. It has proven reliable in these cryptocurrencies.

More information on the basic principles of PoS and other schemes can be found in a previous material on this topic.

Giant PoS

Stake is the Unspent Transaction Output UTXO in the Giant blockchain. As we have already stated about this principle in Giant Blockchain: The Best Features of Dash and Ethereum: “Thanks to UTXO, every transaction uses the outputs of the previous transactions and creates new outputs that would be used by the next similar operations.” Alright, but why does the user who owns a bigger stake have more chances to receive a block reward? On Earlz.net, a solid reason is given for this:

“The PoS difficulty ends up being twice as easy to achieve when staking 2 coins, compared to staking just 1 coin. If this were not the case, then it would encourage creating many tiny UTXOs for staking, which would bloat the size of the blockchain and ultimately cause the entire network to require more resources to maintain, as well as potentially compromise the blockchain’s overall security.”

To receive a PoS reward, you’ll have to keep your wallet active 24/7. Note that this is not your regular Proof-of-Work mining: the Windows version of the Giant QT uses less than Mozilla Firefox which can be evidenced in the Task Manager, the computer resources are not exhausted and the electricity consumption levels are not rising. The wallet client serves as a main tool for staking. The coin daemon on the remote Virtual Private Server (VPS) can also be used for staking and all the information below can be equally applied to this method.

The stated block reward in Giant is 4 GIC. In practice, the number may be lesser, usually around 3.99. The block reward and the PoS reward will become lesser in the future, you can read Giant Specification to find more about this.

You can actually turn off staking in giant.conf — a wallet client configuration file — by changing the default value staking=1 to staking=0.

There are two ways to check your staking process status. Open the Giant console in the Tools section and enter getstakingstatus. The system tells there is no problem with the key staking conditions:

Getinfo is another command in the same console called Giant CLI or giant-cli in various documents. Usually, the system will respond as follows:

“staking status” : “Staking Active”,

After 60 minutes after the UTXO is created, the wallet client starts checking the stake hash and check if this stake can form a new block. If the current stake is acquired from the PoS — it will participate in the staking after 200 more blocks are created.

There is no minimum stake size: even the staker who has 1 GIC has a little chance to create a new block. You can split one stake on may, but the block reward waiting time will not change due to this action. The SHA256 hash values are equally distributed while the argument is chosen randomly.

The stake age is used as a reference only when forming the stake hash but it doesn’t change anything when distributing the block reward.

Staking does not equal guaranteed rewards. Mastenode rewards are another story: the queue is formed and the masternode which didn’t have a reward for a longest time comes first. In staking, the equal distribution principle is achieved through other means. The equal distribution between all stakers is achieved not through the public consensus like in a typical mastenode system. The SHA256 distribution uniformity principle is used instead. Some stakers may not have a needed hash for a long time, while others may receive rewards more often that most users — such phenomena are called staking anomalies.

The staking difficulty self-regulation mechanism is nothing new: DarkGravity v.3 has already been used in a wide range of Proof-of-Work (PoW) projects. The system adapts the difficulty by reviewing the blockchain status every 24 hours. The staking difficulty is used in the consensus formula above and defines the bnTargetPerCoinDay parameter. In mining, difficulty defines the production costs. In staking, the higher difficulty means that a bigger stake is needed to win a reward. The Giant staking difficulty can be checked by either using our online stats or simply typing getdifficulty in Giant CLI. The collateral price of the masternode does not participate in staking as long as the masternode works and this sum is blocked. Speaking of blocking: the wallet which is synchronized with the network must not be blocked in order to commence successful staking. You can view all your stakes in the Send tab by clicking Inputs — turn on the coin control function in the settings to make this button appear:

Giant PoS revenue

In case you have a wallet program turned on but do not receive a PoS reward for a long time, open the Giant console in the Tools section and enter getstakingstatus. In case you get the following, everything is OK with your status as a staker:

In that case, it is likely that the staking difficulty is too high for your stake size. To make the waiting time shorter, you should simply increase your stake. In case the getstakingstatus command does not display your status as shown above or doesn’t work at all, it’s time to repair your wallet.

In case you want to turn your big stake into several split stakes after reaching a certain limit, use the following commands: setstakesplitthreshold (set the limit value) and getstakesplitthreshold(return the current value).

The stakesplitthreshold parameter influences the stake split during the block reward distribution. For instance, you’ve got a 198 GIC stake and the threshold is set to 100 (stakesplitthreshold=100). As a result of the PoS reward distribution, you will get 2 UTXOs, 101 GIC each. This will happen thanks to the following calculation: ((198 + 4) / 2, as 202 > 100).

There is no strategy on how you should store your funds — in a big stake or in several small stakes. Luck is the deciding factor when it comes to block rewards. The amount of approvals or the stake age do not matter in Giant, too. The pre-mined coins are not participating in the staking — you can see it for yourself by monitoring their status in the Block Explorer.

At the time of writing, the staking ROI are a little higher than the masternode ROI and equals approximately 600%. The masternode ROI and the PoS ROI are not the same thing, although these parameters are usually on the same level due to the actions of the big amount of members who are using the estimated masternode ROI as a key factor in solving the following question: to finance a masternode creation or to make a stake?

It is impossible to create a PoS calculator that will always show a correct information due to the flexible nature of PoS consensus. Despite this, you can estimate an approximate staker’s reward waiting time by using the stake size, current difficulty and SHA256 hash distribution uniformity as references. We are planning to create a PoS calculator on the Giant Explorer website. Follow the news on Discord if you don’t want to miss its release.

Conclusion

The primary mission of this material was to explain the constitutive elements of the Giant Proof-of-Stake system. Aside from all of what was just described, you can see that the minimal stake can vary from person to person. Nobody collects the cream of the crop as it happens in the blockchains with Proof-of-Work consensus which makes these economic environments dependent from miners. Now you are free to develop your own optimal strategy.

As noted by trustworthy publications, one of the main obstacles to the wide use of digital currencies in day-to-day payments is their volatility. The Proof-of-Stake also makes Giant Coin less volatile which is highly important considering that it would be used as a payment tool in Giant decentralized applications — Giant.Exchange, Giant.Bet and other future platforms.

Let us know in the comments if the material was understandable, interesting to read, and share the article with your friends who are interested in cryptocurrency market innovations!