Polkadot (DOT)
SDK functions for DOT staking on Polkadot protocol
Introduction to Polkadot staking
As a staker, there are two ways to stake your assets on Polkadot.
You can either join a nomination pool or nominate your validators manually.
Join a nomination pool (recommended approach)
Nomination pools allow users to pool their DOT tokens together on-chain to nominate validators and receive rewards. Participating in pools is more of a set-and-forget action than nominating by yourself. The pool operator maintains the list of validators nominated by the pool, and so, in a way, you are trusting the pool operator to act in your best interests. You can join a nomination pool with a minimum of 1 DOT.
Nominating manually
Nominating is the action of choosing validators. It does not simply involve bonding tokens. Nominating is an active task, which implies that you regularly monitor that your stake is backing an active validator in all the eras and check if you are receiving your staking rewards. More importantly, ensure that the validators you chose always act in the best interests of the network protocol and have less chance of getting slashed. To nominate, you need a minimum of 250 DOT, and to receive rewards, you need at least a balance greater than the minimum active bond.
Nomination pool functions
Join a pool
Join a nomination pool.
The amount to bond is in DOT.
You can find the pool id that you want to join in the URL of the pool, eg Kiln's pool id is 118:
https://polkadot.subscan.io/nomination_pool/118
Bond extra to pool
A bond extra to pool transaction allows you to bond more tokens from your balance to the pool.
The amount to bond is in DOT.
Bond rewards to pool
A bond rewards to pool transaction allows you to bond your available rewards to the pool. You can use this feature to compound your rewards automatically.
Claim payout from pool
A claim payout from pool transaction transfers your available rewards to your wallet.
Unbond from pool
An ubond from pool transaction allows you unbond tokens from the pool. Your tokens remains locked for 28 days before you can withdraw them.
The amount to unbond is in DOT.
Warning
Withdraw unbonded from pool
A withdraw unbonded from pool transaction allows you to withdraw unbonded tokens from the pool.
Nominating directly functions
Bond
A bond transaction allows you to lock tokens that will be used by your nominated validators. The bond transaction should be made if this is the first time you bond tokens from your wallet. If you already have some tokens bonded, use the craftBondExtraTx
function.
The account_id is used to link your DOT stake to your Kiln account.
The stash account is the wallet from which you are bonding token.
The amount to bond is in DOT.
The reward destination can be set to:
Staked: rewards are paid into the stash account, increasing the amount at stake accordingly (auto-compounding).
Stash: rewards are paid into the stash account, not increasing the amount at stake (not auto-compounding).
Custom account address: rewards are paid into the custom account address (not auto-compounding)
Bond extra
A bond extra transaction allows you to lock more tokens to already bonded tokens.
The amount to bond is in DOT.
Rebond
A rebond transaction allows you to bond back tokens that are currently unbonding.
The amount to rebond is in DOT.
Nominate
A nominate transaction allows you to nominate validators (up to 16). Once done, if your nominated validators are elected to produce block on the current era, you will start earning rewards.
Unbond
An unbond transaction allows you to unlock bonded tokens. The unbonding period is about 28 days.
The amount to unbond is in DOT.
Withdraw unbonded
A withdraw unbonded transaction allows you to withdraw unbonded tokens so all unbonded tokens become available in your wallet.
Chill
A chill transaction allows you to freeze a controller account. This means that the controller account will stop nominate validators and you will stop earning rewards from the next era.
Set payee
A set payee transaction allows you to update the reward destination address for the given controller account. You can use the following destination options:
Staked: rewards are paid into the stash account, increasing the amount at stake accordingly (auto-compounding).
Stash: rewards are paid into the stash account, not increasing the amount at stake (not auto-compounding).
Controller: rewards are paid into the controller account (not auto-compounding)
Custom account address: rewards are paid into the custom account address (not auto-compounding)
Sign
Sign a transaction by specifying the integration and the crafted transaction.
Here is an example showing how to sign a transaction with a fireblocks vault.
Checkout the setup fireblocks documentation to setup your vault.
Broadcast
Broadcast a signed transaction.
Get transaction status
Get the transaction status of a broadcasted transaction by providing its transaction hash.
Decode transaction
Decode a serialized transaction previously crafted. You can use this to get more information about a transaction prior to broadcast it such as the gas fees used, the function parameters etc.
Last updated