-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
bot fmt |
@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
RewardRemainder
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 theset_staking_configs
extrinsic.To finish
Replaces #1483
Closes #403