Once you get some tokens,
PUNK at this time, you can use the web wallet to check the balance of your account and delegate it to mixnodes or gateways… but, using the binaries, you can additionally delegate to validators.
For doing this, we first need the
nymd binary on our system to follow the procedure for compiling it from the documentation for validators, but skip the remaining parts https://nymtech.net/docs/run-nym-nodes/validators/.
Specifically, the binaries we’re interested in are:
Restoring the wallet¶
When you created your wallet at https://testnet-milhon-wallet.nymtech.net/ you got a mnemonic phrase that can be used to access it or to restore… we need that one (still keep it private and do not share with anyone).
So… first things first, we need to restore the wallet with:
nymd --keyring-backend=os keys add youruser --recover
Just make sure to use the proper
file to store the key and decide the name
youruser for holding and referring to it with later commands.
Once the key is created (restored), it will output the
punkADDRESS we need to use later on.
Set the variables we’re going to use:¶
1 2 3 4
Staking against a validator¶
We need to know the address of the validator, so we just need to go to the explorer https://testnet-milhon-blocks.nymtech.net/validators decide which one we want to stake on, and in the details page of it, get the address, for example:
punkvaloper1xq1kABCDEqumupju86ljzlj6q2lqhdz2ne76gv and let’s store it as a variable as
To stake, we need to also know our current balance, but as we are not running
nymd but using it as client, we need to specify a validator with the 26657 port open:
Once we know the balance, we should get a value expressed in
upunk and we should consider the commission for the network fees (
5000upunk) and store as a number in a variable
Let’s stake with this command:
This will add the delegation and will start appearing on the explorer for the chosen validator.
After we staked for a while, we might be able to claim the rewards, note that this still requires ‘gas’ in the form of
First let’s check again our balance with:
Let’s claim the rewards:
And let’s check again the balance with
If everything went fine, and we got the tokens there for a while, we should see a growing number of tokens back, that… can be delegated again.
Each transaction requires to pay a fee, so do not try to hurry too much until you make an estimation on how is the staking rewards going on.