Implements a % cap on staking rewards from era inflation#1660
Conversation
|
bot bench polkadot-pallet --pallet=pallet_staking --runtime polkadot |
|
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3769934 was started for your command Comment |
|
@gpestana Command |
|
bot bench substrate-pallet --pallet=pallet_staking |
|
"$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_staking was queued. Comment |
|
@gpestana Command |
Ank4n
left a comment
There was a problem hiding this comment.
A small nit but otherwise looks good.
|
bot bench substrate-pallet --pallet=pallet_staking |
|
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3779467 was started for your command Comment |
|
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5050625 was started for your command Comment |
|
@gpestana Command |
|
bot bench polkadot-pallet --pallet=pallet_staking --runtime westend |
|
@gpestana |
|
bot cancel 2-50f51a7a-9fe2-4098-a268-af52c5e61823 |
|
@gpestana Command |
|
bot bench polkadot-pallet --pallet=pallet_staking --runtime westend |
|
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5050797 was started for your command Comment |
…=westend --target_dir=polkadot --pallet=pallet_staking
|
@gpestana Command |
…#1660) This PR implements an (optional) cap of the era inflation that is allocated to staking rewards. The remaining is minted directly into the [`RewardRemainder`](https://github.com/paritytech/polkadot-sdk/blob/d349b45d086199af7ad0195534e2b913ba9b6827/substrate/frame/staking/src/pallet/mod.rs#L160) account, which is the treasury pot account in Polkadot and Kusama. The staking pallet now has a percent storage item, `MaxStakersRewards`, which defines the max percentage of the era inflation that should be allocated to staking rewards. The remaining era inflation (i.e. `remaining = max_era_payout - staking_payout.min(staking_payout * MaxStakersRewards))` is minted directly into the treasury. The `MaxStakersRewards` can be set by a privileged origin through the `set_staking_configs` extrinsic. **To finish** - [x] run benchmarks for westend-runtime Replaces paritytech#1483 Closes paritytech#403 --------- Co-authored-by: command-bot <>
* remove dispatch_result field * fix benchmarks
* Use an actual Result inside MessageDispatchResult We need this in order to distinguish between Ok and Err * Revert #1660 * Fixes + simplifications * Implement review suggestions
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadots-economics-tools-to-shape-the-forseeable-future/8708/1 |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
This PR implements an (optional) cap of the era inflation that is allocated to staking rewards. The remaining is minted directly into the
RewardRemainderaccount, which is the treasury pot account in Polkadot and Kusama.The staking pallet now has a percent storage item,
MaxStakersRewards, which defines the max percentage of the era inflation that should be allocated to staking rewards. The remaining era inflation (i.e.remaining = max_era_payout - staking_payout.min(staking_payout * MaxStakersRewards))is minted directly into the treasury.The
MaxStakersRewardscan be set by a privileged origin through theset_staking_configsextrinsic.To finish
Replaces #1483
Closes #403