Skip to main content

How to Stake on Zeitgeist

Head to polkadot.js to control your account's staking.

Get the List of Candidates

  1. Choose Developer > Chain state

  2. Choose parachainStaking

  3. Choose candidatePool(): ParachainStakingSetOrderedSetBond

  4. Click + to make a query

  5. Copy the candidate address that you want to delegate your tokens to

Get the Candidate Delegation Count

  1. Choose Developer > Chain state

  2. Choose parachainStaking

  3. Choose candidateInfo(AccountId32): Option<ParachainStakingCandidateMetadata>

  4. Paste the collator candidate's address

  5. Enable the "include option"

  6. Click + to make a query

  7. Get the number of delegationCount

Get the Number of Existing Delegations

Choose Developer > JavaScript and copy the following code to the editor box:

// Simple script to get your number of existing delegations.
// Remember toreplace YOUR_ADDRESS_HERE with your delegator address.

const yourDelegatorAccount = 'YOUR_ADDRESS_HERE';
const delegatorInfo = await api.query.parachainStaking.delegatorState(yourDelegatorAccount);
console.log(delegatorInfo.toHuman()["delegations"].length);
  1. Replace YOUR_ADDRESS_HERE with your address

  2. Click Run button

  3. Get the number of existing delegations

Check the Amount You Can Stake

You have a balance which consists of transferrable, locked and reserved tokens. You can only stake transferrable tokens. To see the amount of transferrable tokens, check the Accounts page:

Stake Your Tokens

Choose Developer > Extrinsics.

  1. Choose the account you would like to delegate your tokens to

  2. Choose parachainStaking

  3. Choose delegate(candidate, amount, candidateDelegationCount, delegationCount)

  4. Copy the candidate's address to delegate (the one you get from "Get the list of candidates" step)

  5. Specify the amount that you would like to stake. The amount is given in Pennocks, which means you need to multiply the amount in ZTG by 101010^{10}, so if you want to stake 1 ZTG, you should fill in 10000000000

  6. Enter the delegationCount from Get the Candidate Delegation Count

  7. Enter the number of existing delegations from Get the Number of Existing Delegations (if you did not stake before, then enter 0)

Check the Stake Result

Once the transaction is confirmed, you can check the result on the Accounts page:

  1. Click the triangle button

  2. You can see the reserved balance

Increase Bond

If you want to delegate more ZTG to a collator with whom you are already staking, you can use the extrinsic delegatorBondMore(candidate, more). Choose Developer > Extrinsics.

  1. Select your account under using the selected account.

  2. Choose parachainStaking under submit the following extrinsic.

  3. Select delegatorBondMore(candidate, more).

  4. Paste the collator address with whom you previously staked into candidate.

  5. Under more enter the amount you want to stake. The amount is given in Pennocks, which means you need to multiply the amount in ZTG by 10^10, so if you want to stake 1 ZTG, you should fill in 10000000000.

  6. Press Submit Transaction

How to Stop Delegations

Schedule Request to Stop Delegations

Choose Developer > Extrinsics.

  1. Select the account you want to execute the revocation for

  2. Choose parachainStaking

  3. Choose scheduleRevokeDelegation(collator)

  4. Select the account you want to remove the delegation for

  5. Submit this transaction

Execute Request to Stop Delegations

Choose Developer > Extrinsics.

  1. Select the account you want to execute the revocation

  2. Choose parachainStaking

  3. Choose executeDelegationRequest

  4. Select the delegator's address

  5. Select the account you want to remove the delegation for

  6. Submit this transaction

Remove All Ongoing Delegations

Choose Developer > Extrinsics.

  1. Select the account you want to remove all delegations for

  2. Choose parachainStaking

  3. Choose executeLeaveDelegators

  4. Select the account you want to remove all delegations for

  5. Enter the total number that you have delegated. To check the number, see Get the Number of Existing Delegations

  6. Submit this transaction

Verify Your State

You can verify whether your delegation was removed by following step:

Choose Developer > Chain state.

  1. Choose parachainStaking

  2. Choose delegatorState

  3. Select your account

  4. Enable the "Include option"

  5. Click the +

  6. Your latest result

Cancel Request to Stop Delegations

Choose Developer > Extrinsics.

  1. Select your account

  2. Choose parachainStaking

  3. Choose the cancelDelegationRequest or the cancelLeaveDelegators, depending on whether your scheduled the request via scheduleRevokeDelegation or scheduleLeaveDelegators

  4. Enter the candidate's address

  5. Submit this transaction