A Guide to GRG Staking

Gabriele Rigo
RigoBlock
Published in
8 min readDec 14, 2020

EDIT (May 2023): GRG staking has been integrated in the dapp app.rigoblock.com and does not require complex transaction ecoding on etherscan. Staking is also supported on multiple chains. This guide is preserved for completeness and to help users follow the staking steps without using the Rigoblock interface.

As per the following official Twitter thread
https://twitter.com/RigoBlock/status/1337502966656495619?s=20
GRG staking was launched on the 11th of December, with a grace period of 14 days.

This means that until the 25th of December 2020, RigoBlock pools operators have time to register their staking pools to the staking system and GRG holders have enough time to stake. Once GRG is staked, the amount staked is included for calculations from the beginning of the following epoch. Each epoch is 14 days long.

The individual pool rewards are based on the RigoBlock “Proof of Performance” incentives mechanism, coupled with a competitive market for stake enabled by the staking system. As GRG was already required for earning “Proof of Performance” rewards, the very big difference is that rather than the pool operator holding the GRG, it is the GRG holders that stake it to the staking pools, i.e. “delegated staking”.

The novelty in the GRG token economics has a dual effect:

  1. to enabling the pools operators to deploy their full capital to their trading strategies;
  2. to activating the GRG holders, as so far such stakeholders did not have an active role in the token economics.

The staking system also introduces a new figure: the “staking pal”. Such a figure, which takes care of registering a specific RigoBlock pool to the staking system or is later set by the pool operator, receives 10% of the operator’s reward. The rationale is to allow a further category of stakeholders which get rewarded by the system to perform support actions to the pool operator, without a middleman.

Perpetual annual inflation of 2% of GRG total supply is autonomously minted at the end of each epoch (excluding the first epoch, where it is 0). The minted reward is fully allocated to active RigoBlock pools, based on their Proof of Performance and delegated stake.

RigoBlock pools share a minimum of 30% of their total reward with their stakers, and such percentage can only be increased. If will be fascinating to observe how the pool operators decide to increase the rewards shared and what type of social dynamics will emerge.

This also creates a competitive market for stake among pool operators, as the smallest staking pools have an edge, with rewards being potentially even multiples of their pool’s assets under management on an annualized basis (even though a rare scenario). The pools with the highest assets-under-management-to-staked-GRG-ratio will offer the best yield to stakers.

As a consequence, GRG staking does not offer a unified APR. Instead, each pool offers a different APR, which will be discussed separately, as the current guide is dedicated to helping you use the system.

All the code is public on GitHub and verified on Etherscan. The RigoBlock staking system is a modified version of the 0x Staking system, with different base protocol token economics. We want to give full credits to the 0x team for making their infrastructure available and a big thank you to them for their great work!

As the only interface to utilizing the staking system is Etherscan at the moment, this guide should clarify how to stake and register a staking pool.

First of all, let us here collect the Etherscan links of the relevant smart contracts:

  1. GRG Token: https://etherscan.io/address/0x4fbb350052bca5417566f188eb2ebce5b19bc964#writeContract
  2. RigoBlock Staking Proxy: https://etherscan.io/address/0x730dDf7b602dB822043e0409d8926440395e07fE#writeProxyContract
  3. GRG Transfer Proxy: 0x8C96182c1B2FE5c49b1bc9d9e039e369f131ED37

We will divide the explanation into three parts: the first on how to connecting either MetaMask or WalletConnect to Etherscan; the second for the staker, the third for the pool operator (or the staking pal in his place).

A note to holders that use cold-storage wallets like Ledger or Trezor, your wallet can be connected to Etherscan through MetaMask without having to import your keys into a “hot” machine. This hyperlinked guide is one of many available.

How to connect your wallet to Etherscan

Once you are on the “Write Contract” section of the “Contract” (as per the previous links), you will see the red-dotted box “Connect to Web3):

As you click on the “Connect to Web3” box, a popup will appear:

Select either MetaMask or WalletConnect, then follow the classic procedure for connecting with either wallet. Make sure the red-dotted box is not green-dotted and says “Connected — [wallet type, Ethereum wallet address]:

If you can’t see the wallet in the green box, you may have to repeat the procedure another time. As you are going to interact with two different smart contracts, you are going to interact with two different web pages as well, therefore make sure both pages have the green dot.

In particular, if you are using tabs in your browser and loading the two pages at the same time:

  1. if you are using MetaMask, you will have to connect to each page individually;
  2. if you are using WalletConnect, once you connect your wallet to Etherscan on one tab, simply reload the other tab’s page and it will be connected to WalletConnect with the same wallet. When you are done, you may just disconnect from your base wallet.

How a GRG holder stakes

In order to stake to a staking pool, 3 on-chain transactions have to be sent:

  1. “approve” on the GRG Token contract of the GRG transfer proxy address to spend GRG on behalf of the holder;
  2. “stake” on the RigoBlock Staking contract to deposit tokens to the staking system;
  3. “moveStake” on the RigoBlock staking contract to select the pool to stake to.

APPROVE

The holder must first set approval to the GRG Transfer Proxy. This is required as the staking system will deposit the staked GRG to the GRG Vault contract, a contract whose sole purpose is to hold the staked GRG. On the GRG Token contract
https://etherscan.io/address/0x4fbb350052bca5417566f188eb2ebce5b19bc964#writeContract
once a wallet is connected, the user will click on method:

  1. Approve

The method has 2 fields: 1) _spender 2) _value

Paste 0x8C96182c1B2FE5c49b1bc9d9e039e369f131ED37 in the “_spender “ field (the GRG Transfer Proxy address) and the amount you want to stake followed by 18 zeros (000000000000000000) in the “_value” field.

Click “Write” and confirm the transaction in your wallet.

This transaction will not move any token, it is required to the staking system to move tokens on your behalf.

STAKE

Once the previous transaction is mined on the Ethereum blockchain (you will receive a notification in your wallet), move to the Staking Proxy contract

https://etherscan.io/address/0x730dDf7b602dB822043e0409d8926440395e07fE#writeProxyContract

Connect your wallet as explained before, then scroll down the page until you find the method

16. Stake

Paste the amount you approved before in the “amount” field.

Click “Write” and confirm the transaction in your wallet.

This transaction will move the GRG amount to the GRG Vault, where they will be segregated until you decide to unstake them. However, this operation will not actively stake the tokens to a specific token pool. In order to do that, we need to move to the next part.

MOVE STAKE

The “MoveStake” method allows you to decide to what pool you want to stake and what amount. You may also use this method to increase your stake later on. Also note, that once tokens are delegated to a specific token pool, they are locked until the end of the following epoch, meaning you may unstake at any time, but will be able to effectively withdraw the tokens once the epoch the tokens have been staked for has ended.

Scroll the Etherscan page to method

10. moveStake

The transaction will allow you to allocate your stake to a specific pool, i.e. moving a certain amount (or all) of the staked tokens from status “UNDELEGATED” to “DELEGATED” for a specific pool. While this may seem complicated, it is just a matter of understanding how to set the parameters. In particular, with the fields “from” and “to” we do not mean addresses, but status on a particular pool ID.

in the “from” field, you will paste something similar this
[“0”,”pool id (bytes32)”]

while in the “to” field, you will paste something similar to this
[“1”,”pool id (bytes32)”]

“amount” is the amount you want to stake, should be same as the amount you approved.

It will be “similar”, as you will have to paste the pool id in place of what we wrote as pool id (bytes32). You will be able to find the pool ID by opening (in a new tab) the “Read as Proxy” box, scrolling down to method
27. poolIdByRbPoolAccount
and input the RigoBlock pool account (the smart contract address of the RigoBlock pool you want to stake to).

Note that the RigoBlock pool must have been previously registered to the staking system, otherwise your stake will remain undelegated.

NOTE: the following staking pool is associated with a Rigoblock pool from a deprecated version and is only referenced as a placeholder. Staking to that pool will not result in any staking rewards.

For example, a random input method will look like this:

“from”
[“0”,”0x0000000000000000000000000000000000000000000000000000000000000021”]

“to”
[“1”,”0x0000000000000000000000000000000000000000000000000000000000000021”]

“amount”

100000000000000000000

Click “Write” and confirm the transaction in your wallet.

EDIT: it seems Etherscan has amended the required state input (i.e. “0” or “1”) format, for completeness the alternative inputs are:
[0,”0x0000000000000000000000000000000000000000000000000000000000000021”]
[1,”0x0000000000000000000000000000000000000000000000000000000000000021”]
where the 0 and 1 states are not included in “”.

Once the transaction is mined on the Ethereum blockchain and confirmed in your wallet, you have successfully delegated your stake to the pool.

Please note that the stake is never in control of the pool, as it is deposited in the GRG vault, where it is withdrawn by the staker only. The system, therefore, allows GRG holders who become active stakers to earn a market risk-free reward on their GRG (of course the holder’s market risk for GRG — holder’s base currency risk is unmodified from the traditional GRG holder position).

HOW THE POOL IS REGISTERED

One of the conditions for registering a pool with the staking system is that it is a registered RigoBlock pool. This simplifies the creation of the pool as follows:

  1. the staking pool operator is the RigoBlock operator regardless who registers the RigoBlock pool to the staking system;
  2. the account that registers the pool to the staking system becomes the “staking pal”, and is beneficiary to 10% of the pool operator’s rewards;
  3. the “staking pal” can be any account that takes care of registering the pool. The RigoBlock pool must already exist for it being registered to the staking system.

Once you’ve connected your wallet to the Etherscan at the following URL:
https://etherscan.io/address/0x730dDf7b602dB822043e0409d8926440395e07fE#writeProxyContract
find the method

3. createStakingPool

and input the address of the RigoBlock pool you want to register.

If you have questions, join the dedicated Discord https://discord.gg/FXd8EU8

--

--