Custodial and Non-Custodial Staking
Pocket has the ability for node runners to set up their nodes to run with “non-custodial” staking. This means that the Pocket address that is associated with staking and running the node is not the recipient of the funds once the node is unstaked.
This feature was activated as of version 0.9.1.3.
Node runners who staked their nodes prior to activation of non-custodial staking will have one opportunity to decide if they want their nodes to have custodial or non-custodial staking. After this point, if they wish to switch between the two options, they will need to unstake/restake their node.
Custodial staking is the process of having the operator of the node be the recipient of the rewards of that node. This is true regardless of whether the node is a servicer or a validator.
In this scenario, only one Pocket account is needed to run a node. This account handles all aspects of node maintenance such as staking, editing the stake, unjailing, and unstaking.
Prior to activation of non-custodial staking, this was the only option that node runners had.
Non-custodial staking allows for the separation of the node operator and reward recipient accounts. There are two Pocket accounts involved in the process: the operator account and the output account.
The operator account is responsible for signing claims and proofs, as well as block proposals and attestations. It needs to have some unstaked POKT to pay for these transactions.
The output account receives all rewards generated by the node. It also receives the original stake once the node is unstaked.
Non-custodial staking can be initiated by any operator or output account with sufficient POKT balance. The staked POKT will be taken from the account that initiates staking, and sent to the output account when unstaked.
Both the operator and output accounts can perform the staking and also any and all node maintenance (unstake, unjail, update relay chains, etc.).
The output account can’t be changed after staking, so it is vitally important to both make sure your output account is set correctly in the staking command, as well as to ensure access (keys) to that output account.
Failure to do both of these tasks will result in all rewards and staked funds being sent to an inaccessible account and lost forever! It is not possible for the operator account to receive staked POKT or rewards in a non-custodial configuration.
Benefits of non-custodial staking
An operator address must reside in a “hot” wallet on the node. This could potentially represent a security risk when the server is operated by a third-party. As third-party node hosting is common, there has arisen a need to have the recipient wallet for rewards not be on the same server as the node.
Non-custodial staking allows for this scenario. All you need to specify is the wallet (“output”) address, which is denoted when staking the node. The wallet can reside off the server.
Another benefit to non-custodial staking is the ability to pool rewards into a single account. Since each node has to have a distinct operator account, this would previously have resulted in rewards being split across multiple wallets, which is inconvenient for a node runner with many nodes.
The command for staking a node was updated when non-custodial staking was activated. Please see below for the updated command syntax.
pocket nodes stake custodial <operatorAddress> <amount> <relayChainIDs> <serviceURI> <networkID> <fee> <isBefore8.0>
pocket nodes stake custodial 0123456789012345678901234567890123456789 15100000000 0001,0021 https://pokt.rocks:443 mainnet 10000 false
pocket nodes stake non-custodial <operatorPublicKey> <outputAddress> <amount> <RelayChainIDs> <serviceURI> <networkID> <fee> <isBefore8.0>
pocket nodes stake non-custodial 0123456789012345678901234567890123456789012345678901234567890123 0123456789012345678901234567890123456789 15100000000 0001,0021 https://pokt.rocks:443 mainnet 10000 false
Some notes on these commands:
- The parameter
non-custodialsets this permanently on your node. You can’t change this later unless you unstake.
- The parameter
<isBefore8.0>is boolean. It was set to be a transitional variable to denote whether or not the non-custodial activation has occurred. As this feature is now active, you will need to set this to
- Be aware that the non-custodial command takes the operator public key as the argument (
<operatorPublicKey>), not the operator wallet address like in the custodial command. The reason why the public key is used and not the address is for the situation where the owner of the output address is doing the staking, but does not also have ownership of the operator account. In this case, they may only have the public key for that account.
- The non-custodial command adds
<outputAddress>as the recipient of the staking rewards.
For more information on the full usage of these commands, including all parameters, please see the Pocket Core docs.
Important for existing nodes
If you have a node that was staked prior to the activation of non-custodial staking, you have only one opportunity to switch to non-custodial staking.
Any Pocket node command successfully issued (for example, to adjust the stake) will “lock” the node into custodial, unless a non-custodial command is issued with a valid output address. Following this, the only way to switch between custodial and non-custodial is to unstake/restake the node (and recall that there is a 21 day unstake period).
Important for all nodes
Be very careful entering the output address. You cannot change the output address after it is set. If you accidentally mistype the output address, your funds and your stake will be sent to that address and will be lost forever.
If you wish to change your output address, you can first unstake the node, and the rewards will be sent to that address. Then you can restake the node with a new output address.
Make sure the operator account has some POKT left after staking, as it will still be responsible for ongoing claim and proof transactions, which each carry a 0.01 POKT transaction fee.
The unstaking process is the same using custodial or non-custodial staking.
pocket nodes unstake <operatorAddr> <fromAddr> <networkID> <fee> <isBefore8.0>
pocket nodes unstake 0123456789012345678901234567890123456789 0123456789012345678901234567890123456789 mainnet 10000 false
During the unstaking process, a transaction is not generated when sending the staked POKT to the output address. This is intended behavior, and is similar to how proofs work on the blockchain.
This lack of transaction happens regardless of whether you are using custodial or non-custodial staking, but in the case of custodial staking, there is no ambiguity on where the staked POKT is being sent.
In order to verify that your POKT is where it should be, we recommend querying the blockchain directly, instead of relying on a block explorer service that may not interpret the results accurately.
You can use the interactive API Docs to query the balance for an address at a given block height. Try it here.