logo

Staking Module

Important Parameters

The important parameters to be aware of when understanding the darwinia staking module are as follows:
  • RewardRemainder - Tokens have been minted and are unused for stakers reward. Usually, it's treasury.
  • MinStakingDuration - Minimum time to stake at least.
  • PayoutFraction - The percentage of the total payout that is distributed to stakers. Usually, the rest goes to the treasury.
  • MaxCommission - Maximum commission rate.

Parameters In The Networks

Darwinia
Crab
Pangolin Testnet
Pangoro Testnet
RewardRemainder
Treasury
Treasury
Treasury
Treasury
MinStakingDuration
14 days
14 days
10 mins
10 mins
PayoutFractio
40%
40%
40%
40%
MaxCommission
30%
30%
30%
30%

Extrinsic API Documentation

  • stake(ring_amount: Balance, kton_amount: Balance, deposits: Vec<DepositId<T>>)
    • Add stakes to the staking pool. This will transfer the stakes to a pallet/contact account.
    • Params:
      • ring_amount: the amount of RING to be staked.
      • kton_amount: the amount of KTON to be staked.
      • deposits: a vector of specific deposits that you want to add to the staking pool.
  • unstake(ring_amount: Balance, kton_amount: Balance, deposits: Vec<DepositId<T>>)
    • Withdraw stakes from the staking pool.
    • Params:
      • ring_amount: the amount of RING to be withdrawn.
      • kton_amount: the amount of KTON to be withdrawn.
      • deposits: a vector of specific deposits that you want to withdraw from the staking pool.
  • restake(ring_amount: Balance, kton_amount: Balance, deposits: Vec<DepositId<T>>)
    • Cancel the unstake operation. Re-stake the unstaking assets immediately.
    • Params:
      • ring_amount: the amount of RING to be restaked.
      • kton_amount: the amount of KTON to be restaked.
      • deposits: a vector of specific deposits that you want to restake immediately.
  • claim:
    • claim the stakes from the pallet/contract account.
  • collect(commission: Perbill)
    • Declare the desire to collect. Effects will be felt at the beginning of the next session.
    • Params:
      • commission: the proportion of the staking reward that you want to collect, represented as a perbill (a fraction of a billion).
  • nominate(target: T::AccountId)
    • Declare the desire to nominate a collator. Effects will be felt at the beginning of the next session.
    • Params:
      • target: the account ID of the collator you wish to nominate.
  • chill
    • Declare no desire to either collect or nominate. Effects will be felt at the beginning of the next era. If the target is a collator, its nominators need to re-nominate.
  • set_collator_count(count: u32)
    • Set collator count. This will apply to the incoming session. Require root origin.
    • Params:
      • count: the number of collators you want to set for the upcoming session.