Skip to content

Commit

Permalink
Fix Staking API Max Nominations (#5493)
Browse files Browse the repository at this point in the history
* updated staking api call

* hard fix

* Update docs/general/kusama/kusama-parameters.md

---------

Co-authored-by: Radha <[email protected]>
  • Loading branch information
filippoweb3 and DrW3RK authored Jan 10, 2024
1 parent 6bf8dd9 commit 683b7e0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 37 deletions.
6 changes: 2 additions & 4 deletions docs/general/kusama/kusama-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ The Kusama Council consists of up to 19 members and up to 19 runners up.

### Staking, Validating, and Nominating

A maximum of
{{ polkadot: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
validators can be nominated by a nominator on Kusama.
A maximum of 24 validators can be nominated by a
nominator on Kusama.

| Kusama | Time | Slots | Description |
| -------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
23 changes: 10 additions & 13 deletions docs/learn/learn-nominator.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,13 @@ metrics shown as an example, followed by a brief description of each.
nominators (sorted by stake) will receive rewards. The remaining nominators will not be rewarded.
However, they can be slashed if the validator commits a slashable offense.

Every nominator can select up to a maximum of
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
validators, which contributes towards maximizing the probability of having the nominator’s stake
applied to the validators active set. Nominating too few validators could result in the nominators
not receiving their rewards when none of them make it to the active set or when those validators
stop validating. The election algorithm attempts to maximize the overall network stake while
minimizing the variance of the active stake across the validators. For additional information on
the election process, check out the research behind
Every nominator can select up to a maximum of {{ polkadot: 16 :polkadot }}
{{ kusama: 24 :kusama }} validators, which contributes towards maximizing the probability of
having the nominator’s stake applied to the validators active set. Nominating too few validators
could result in the nominators not receiving their rewards when none of them make it to the active
set or when those validators stop validating. The election algorithm attempts to maximize the
overall network stake while minimizing the variance of the active stake across the validators. For
additional information on the election process, check out the research behind
[nominated proof-of-stake](https://research.web3.foundation/Polkadot/protocols/NPoS).

- **comm.**: Total commission kept by the validator (100% means the validator will keep all rewards
Expand Down Expand Up @@ -341,10 +339,9 @@ and you are nominating with enough stake to get into the solution set, your bond
fully distributed to one or more validators. That being said, you may not receive rewards if you
nominated very few validator candidates and no one got elected, or your stake is small, and you only
selected oversubscribed validators, or the validator you are nominating has 100% commission. It is
generally wise to choose as many trustworthy validators as you can (up to
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/>) :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/>) :kusama }}
to reduce the risk of none of your nominated validators being elected.
generally wise to choose as many trustworthy validators as you can
{{ polkadot: (up to 16) :polkadot }}{{ kusama: (up to 24) :kusama }} to reduce the risk of none of
your nominated validators being elected.

:::info Not receiving Staking Rewards?

Expand Down
6 changes: 2 additions & 4 deletions docs/learn/learn-phragmen.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,8 @@ to an off-chain worker, which validators can work on the problem without impacti
time.

There are several restrictions put in place to limit the complexity of the election and payout. As
already mentioned, any given nominator can only select up to
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
validators to nominate. Conversely, a single validator can have only
already mentioned, any given nominator can only select up to {{ polkadot: 16 :polkadot }}
{{ kusama: 24 :kusama }} validators to nominate. Conversely, a single validator can have only
{{ polkadot: <RPC network="polkadot" path="query.staking.maxNominatorsCount" defaultValue={50000}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="query.staking.maxNominatorsCount" defaultValue={20000}/> :kusama }}
nominators. A drawback to this is that it is possible, if the number of nominators is very high or
Expand Down
18 changes: 7 additions & 11 deletions docs/learn/learn-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,11 @@ and sophisticated mechanism to select the validators who are allowed to particip

Any potential validators can indicate their intention to be a validator candidate. Their candidacies
are made public to all nominators, and a nominator, in turn, submits a list of up to
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
candidates that it supports, and the network will automatically distribute the stake among
validators in an even manner so that the economic security is maximized. In the next era, a certain
number of validators having the most {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} backing
get elected and become active. For more information about the election algorithm go to
[this](learn-phragmen.md) page on the wiki or
{{ polkadot: 16 :polkadot }} {{ kusama: 24 :kusama }} candidates that it supports, and the network
will automatically distribute the stake among validators in an even manner so that the economic
security is maximized. In the next era, a certain number of validators having the most
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} backing get elected and become active. For
more information about the election algorithm go to [this](learn-phragmen.md) page on the wiki or
[this](https://research.web3.foundation/Polkadot/protocols/NPoS/Paper) research article. As a
nominator, a minimum of
{{ polkadot: <RPC network="polkadot" path="query.staking.minNominatorBond" defaultValue={2500000000000} filter="humanReadable"/> :polkadot }}
Expand Down Expand Up @@ -552,10 +550,8 @@ qualify. For more information, visit the

- Earn rewards for contributing to the network's security through staking.
- Low barrier of entry through [Nomination Pools](learn-nomination-pools.md).
- Can choose up-to
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
validators which can help to decentralize the network through the sophisticated
- Can choose up-to {{ polkadot: 16 :polkadot }} {{ kusama: 24 :kusama }} validators which can help
to decentralize the network through the sophisticated
[NPoS system](learn-consensus.md/#nominated-proof-of-stake)
- 10% inflation/year of the tokens is primarily intended for staking rewards.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ These concepts have been further explained in Polkadot's

You are now bonded. Being bonded means your tokens are locked and could be
[slashed](../../learn/learn-staking.md#slashing) if the validators you nominate misbehave. All
bonded funds can now be distributed to up to
{{ polkadot: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="consts.staking.maxNominations" defaultValue={24}/> :kusama }}
bonded funds can now be distributed to up to {{ polkadot: 16 :polkadot }} {{ kusama: 24 :kusama }}
validators. Be careful about the validators you choose since you will be slashed if your validator
commits an offence.

Expand Down
3 changes: 1 addition & 2 deletions docs/maintain/maintain-polkadot-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ The Polkadot Council consists of up to 13 members and up to 20 runners up.
### Staking, Validating, and Nominating

The maximum number of validators that can be nominated by a nominator is
{{ polkadot: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/>. :polkadot }}
{{ kusama: <RPC network="polkadot" path="consts.staking.maxNominations" defaultValue={16}/>. :kusama }}
{{ polkadot: 16. :polkadot }} {{ kusama: 24. :kusama }}

| Polkadot | Time | Slots | Description |
| -------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down

0 comments on commit 683b7e0

Please sign in to comment.