Everything you need to know about staking STRAX
Staking is essential to the Proof of Stake consensus mechanism used on the STRAX Blockchain. Blocks are verified and mined by network participants who are willing to set aside a portion of their tokens, effectively freezing them so they cannot be spent. In return, these participants are granted the right to verify transactions and earn bonuses paid in tokens. The larger the number of tokens a participant is willing to stake, the greater the chance they will be selected to mine the next block and earn the associated reward.
What is STRAX Cold-Staking?
Cold-Staking has been activated on the STRAX Blockchain since its inception. However, relevant changes have now been made within the STRAX Wallet, enabling Cold-Staking configurations to be set up with relative ease.
This allows you to use a hot node and a cold wallet to ensure maximum security of your funds, the detailed guide below walks you through the process.
To produce blocks on the Stratis network, a miner must be online with a node running and have their wallet open. The chances of earning a reward for staking increases linearly with the number of tokens staked, which means the most successful miners are likely to have large numbers of tokens frozen in their wallets. This represents a risk if the tokens are held in a hot wallet which is compromised. For this reason, Stratis permits Cold Staking where the miner still needs to be online with a node running and
their hot wallet open, but the tokens used for staking can be safely stored offline in cold storage. Their hot wallet need not hold any significant number of tokens or may be empty.
Stratis cold storage is implemented on the node, with the connected wallet only using the node’s interfaces. The hot wallet should be an HD (Hierarchical Deterministic) Wallet and, initially, this must be the Stratis wallet which comprises a GUI for controlling the Cold Staking process. Also, a Cold Staking user needs to have an offline cold wallet to store the staked tokens.
Lastly you want to make sure to have a USB device to transfer data from the cold device back to the hot device and visa versa.
How to Cold-Stake STRAX
Creating a Hot-Wallet (Online)
We will be using an online, fully synchronized wallet as the hot staking wallet.
Create a new wallet using the Stratis wallet user interface. In our example, we will be using a wallet named “HotStakingWallet1”. After decrypting the hot wallet; navigate to the Cold-Staking tab within the STRAX Wallet.
We will set up the wallet as a hot staking wallet first. In the “Hot wallet functionality” section, click the “Setup this wallet as a hot staking node” tab, enter your password and click confirm.
After confirming and successfully setting up the wallet as a hot staking wallet, the page will display your hot staking address. Keep this address at hand as we will use it to set up cold staking.
We suggest keeping a text file with all the necessary data on a thumb drive and will assume you do too throughout the rest of the setup process.
Please note: If you are not using a third party, this wallet will have to be online and unlocked for staking to actively cold stake. Staking can be activated in the “staking” page by entering your wallet password and clicking the unlock button.
Setting up your cold wallet
As mentioned at the start of the setup process, we will be using a separate wallet on a different computer to set up the cold wallet. The computer should be offline; thus, the wallet is not connected or synchronized.
In our example, we will be creating a new wallet called ColdStakingWallet1. After decrypting the wallet go to the receive tab to get a new address to fund your wallet. Fund the address with the number of tokens you want to use for cold staking.
Since your wallet is offline and not synchronized, you will not see your transaction history or total balance. Please use the block explorer to check if your address was successfully funded:
After funding the address head over to the cold staking page on your cold (offline) wallet. In the “Cold wallet functionality” section, click the “Set up this wallet as a cold wallet” tab, enter your password and click “Set up cold staking account”.
After confirming and successfully setting up the wallet as a cold wallet, the page will display your cold staking address. Save this address in your text file on your thumb drive as the cold staking wallet address.
In addition to the cold-staking address, we also need the Extended Public Key of your cold wallet. Head over to the “ADVANCED” tab and click “Copy key to clipboard” at the end of the Extended Public Key section.
Save the extended public key in your text file on the thumb drive.
This is an example of how the current text file should look; please note that your values will be different.
Because our cold staking wallet is offline, we can not create the cold staking setup transaction. Therefore we will need an online and synchronized wallet to complete the process. You can use any online wallet on an online system; it does not have to be the hot staking wallet we created in the first
step. We will need the data that we saved in the text file for the next steps, so you should switch your thumb drive from the offline computer to your online computer that contains an online wallet.
In the online wallet, go to the “COLD STAKING” page and click the “Import cold wallet extended public key” tab. Please select the “I want to import an extended public key to set up cold staking” option in the dropdown. The form will also ask you for a wallet name, the extended public key and the cold wallet creation date.
Please note: The wallet name does not need to match your cold wallet name; it can be anything you want, but please write it down as we will need it in the next step.
Use the correct data and click “Import”. On success, you will see a message on the bottom of your screen.
After importing the extended public key, click the “Create unsigned cold staking transaction” tab. Complete the form with the data from your text file. Set the amount you want to stake; we recommend using the entire balance that was used to fund the cold staking wallet.
After entering the correct values, click “Next”.
On this page, carefully check and confirm the cold-staking setup values. If everything checks out, click “Next”.
If all data was entered correctly, the process will now show you a very long encoded transaction that you can copy. Copy the encoded transaction into your text file on your thumb drive.
We currently have the following data in our text file:
The encoded transaction is an unsigned transaction, and you will need to head back to the offline computer with your thumb drive to sign the transaction.
Open your cold staking wallet, go to the “COLD STAKING” page and in the “Cold wallet functionality” section click the “Sign a cold staking transaction” tab.
Paste the entire encoded transaction into the form and enter your password, then click “Confirm.
Please note: The encoded transaction is very long, make sure you copy it entirely.
After confirming, your cold wallet will sign the transaction and return a transaction hex.
Since our cold wallet is offline, it can not broadcast this transaction by itself.
Copy the transaction hex to the text file of your thumb drive.
Our text file currently looks like this:
As the final step, we need to broadcast this transaction on an online node. Take your thumb drive back to the computer containing an online wallet, head over to the “ADVANCED” page and click “Broadcast transaction”
Copy the signed transaction hex into the “Transaction Hex” input and click “Broadcast Transaction”
If all went well, your wallet should display a “Transaction broadcasted successfully” message on the bottom of the page.
Congratulations, you have now successfully set up cold staking.
Please note: You will only get rewards if your hot staking node is online and has staking enabled.
Okay, this was a lot of steps compared to some of our other staking tutorials but this process was unique. You are now “cold-staking” which means your STRAX coins are offline in a secure device not connected to the internet. It is important to note that you also have a hot staking node that is online but doesn’t have any STRAX coins in it.
What you trade off in the setup length you add in safety, which cannot be discounted in an ear where hacks are becoming more common. Although not necessary, I would recommend doing this process instead of staking with a custodial service or simply hot staking.
For more information on estimating you STRAX Staking Rewards visit the Stratis Staking Rewards Calculator.