Skip to main content

ParachainStaking

ParachainStaking pallet functions as a decentralized staking system within the peaq/krest networks, permitting users to stake/delegate their $PEAQ/$KREST tokens. This staking process enables users to participate in block production and helps to make the network more censorship-resistant.

Functions

  • cancelLeaveCandidates(): Revokes a candidate's pending scheduled request to exit the candidate pool.

  • candidateStakeLess(less): Stake less funds for a collator candidate.

  • candidateStakeMore(more): Stake more funds for a collator candidate.

  • delegateAnotherCandidate(collator, amount): Delegate to another collator candidate by staking some funds and increasing the collator's total stake.

  • delegatorStakeLess(candidate, less): Reduce delegator stake.

  • delegatorStakeMore(candidate, more): Increase delegator stake.

  • executeLeaveCandidates(collator): Execute the leave request of a candidate who requested to leave at least ExitQueueDelay rounds ago. Prepares unstaking of the collator candidate stake and their delegators stake which can be unlocked via unlock_unstaked after waiting at least StakeDuration number of blocks.

  • forceNewRound(): Forces the start of the new round in the next block.

  • forceRemoveCandidate(collator): Forcedly removes a collator.

  • initLeaveCandidates(): Request to leave the set of collator candidates.

  • joinCandidates(stake): Join the set of collator candidates.

  • joinDelegators(collator, amount): Join the set of delegators by delegating to a collator candidate.

  • leaveDelegators(): Leave the set of delegators and, by implication, revoke all ongoing delegation.

  • revokeDelegation(collator): Terminates an ongoing delegation for a given collator candidate.

  • setBlocksPerRound(new): Set the number of blocks each validation round lasts.

  • setMaxCandidateStake(new): Set the maximal amount a collator can stake Existing stakes are not changed.

  • setMaxSelectedCandidates(new): Set the maximum number of collator candidates that can be selected at the beginning of each validation round.

  • setRewardRate(collatorRate, delegatorRate): Set the reward rate.

  • unlockUnstaked(target): Unlock all previously staked funds that are now available for unlocking by the origin account after StakeDuration blocks have elapsed.