Please note that this is an article on staking that may be advanced. If you are already familiar with the concept of staking tokens, and using Ethereum in the browser then you should be fine. If you need a refresher, please refer to our Staking 101 article.
If you have staked tokens either on a node or the network in the Matrix, then there may be a time when you decide to withdraw the stake. The ability to withdraw the staked tokens is dependent on the current state your tokens are in. In this article we will go over the different steps that have to be taken depending on the state.
*Please note that nothing in this article constitutes investment advice or income management advice of any kind.
The Matrix is accessible here - https://matrix.xyo.network/
Before we begin
Be sure to have the Metamask Extension in your web browser. We recommend either Google Chrome or the Brave Browser in order use the Matrix with Metamask. You cannot use the Matrix to conduct most viewing and staking transactions without signing in using Metamask.
Here is an article on installing Metamask
Connect your XYO Account Address using Metamask by clicking on 'Connect Wallet' at the top navigation bar in the Matrix. IMPORTANT - be sure to have some ETH as well as XYO in your account. You will need ETH to pay for gas fees to execute the transactions necessary to change state.
Once you are connected, you should see an ETH balance and an XYO balance
The ETH balance does not need be large, as gas is low for these transactions.
What we will go over
Understanding The State of Your Staked Tokens
When your staked tokens are in an unstaked state
When your staked tokens are in a cooldown state
When your staked tokens are in an active cooled-down state
Understanding The State of Your Staked Tokens
To be able to conduct actions on our stake, we should understand the state of our stake.
*NOTE Only stake in a node can be withdrawn. If you have network stake that you want withdrawn, the bond must be expired, and it must be allocated to a node.
A note about Cooldown
You will see this term come up throughout this article. Cooling down staked tokens is an action that must happen after the stake has been activated, and after it has been unstaked. This cooldown period is a governance tool that is meant to mitigate volatility and to ensure that all staking transactions are valid.
The initial state of most node stake is inactive. Which would display the Activate Stakebutton under Change State.
Once stake is active, then we have a few different states that the staked tokens could be in.
Active stake needs to be cooled down before it can collect rewards and/or be unstaked. You can also hover over the button for a tooltip explaining the effects of the current state.
Once your stake has been cooled down, it is still active, but now your tokens can be unstaked.
Once all cooldown has been complete, and the unstake transaction has completed, then the staked tokens can be withdrawn.
When your staked tokens are in an unstaked state
When you see the Withdraw Stake button under Change State, your staked tokens are ready to be withdrawn. This is the only state where you can execute a transaction to withdraw tokens back to your account.
1. Be sure that the Withdraw Stake button is under Change State
2. Click on Withdraw Stake - you should see a pop-up from Google Chrome with your Metamask wallet. IMPORTANT - you must be signed in to the Matrix using Metamask and your XYO account address that matches your account on the Matrix.
3. Confirm the transaction on Metamask - in the Metmask pop-up, verify the gas amount and then click on Confirm. There is no need to add gas to speed up the transaction, as this should not take too long.
4. Once you have confirmed the transaction a loading graphic will appear where the Withdraw Stake button once was. This confirms that the transaction is processing.
5. You should now see that the state is withdrawn, and your XYO balance at the top of the Matrix will update with the new balance. Also the UI will update the stakee and staker with zeroed out addresses. Your tokens are now withdrawn.
When your staked tokens are in a cooldown state
When you see the Cooldown Stake button under Change State, your newly activated staked tokens need to be cooled down. Once this is complete you can then unstake and withdraw.
1. Be sure that the Cooldown Stake button is under Change State
2. Click the Cooldown Stake button -you should see a pop-up from Google Chrome with your Metamask wallet. IMPORTANT - you must be signed in to the Matrix using Metamask and your XYO account address that matches your account on the Matrix.
3. Confirm the transaction on Metamask - in the Metmask pop-up, verify the gas amount and then click on Confirm. There is no need to add gas to speed up the transaction, as this should not take too long.
4. Once you have confirmed the transaction a loading graphic will appear where the Cooldown Stake button once was. This confirms that the transaction is processing. Once this is complete, your stake allows you to participate in governance (upcoming feature) and receive network reward tokens on contributions to the network.
5. You will see a countdown for the cooldown to complete under Change State. Once this countdown ends then the Unstake button will appear, and your staked tokens will be cooled down.
When your staked tokens are in an active cooled-down state
When you see the Unstake button under Change State, your activated tokens have been cooled down and is now participating stake, and can be unstaked. You must unstake before you can withdraw your staked tokens.
1. Be sure that the Unstake button is under Change State
2. Click the Unstake button -you should see a pop-up from Google Chrome with your Metamask wallet. IMPORTANT - you must be signed in to the Matrix using Metamask and your XYO account address that matches your account on the Matrix.
3. Confirm the transaction on Metamask - in the Metmask pop-up, verify the gas amount and then click on Confirm. There is no need to add gas to speed up the transaction, as this should not take too long.
4. Once you have confirmed the transaction a loading graphic will appear where the Unstake button once was. This confirms that the transaction is processing. Once this is complete, your stake will be ready to be withdrawn and you should see the Withdraw Stake button. You can then refer back to the When your staked tokens are in an unstaked state section.
Recap
- Before you can withdraw your staked tokens - you must activate, cooldown, and then unstake.
- Change State is where you can change the state of your staked tokens and/or verify the current state.
- Each change of state (including a withdraw) requires a transaction which executes a particular contract. These transactions are completed through Metamask.