substrate
substrate copied to clipboard
Nomination Pool Commission
This PR adds commission functionality to Nomination Pools.
A Commission struct and CommissionThrottle struct have been introduced to have:
- the current commission, defaults to
0%. - a maximum commission: defaults to
None, can be set and then subsequently accepts more restrictive values - a receiver - the account to receive commission, defaults to
None. - throttle: allows an optional configuration to limit how often, and by how much, commission can be changed. defaults to
None, and accepts more restrictive updates after initial values set.
set_commission_receiver ,set_commission, set_max_commission, and set_commission_throttle calls have been introduced.
The commission is split and sent in do_reward_payout.
Notes:
I wonder if we can merge the 4 calls into one call, set_commission_configs that can accept a Noop or an updated value, to decrease the amount of these calls being introduced here.
Addresses #11672.
TODO:
- [ ] Commission deduction / transfer tests on
do_reward_payout. - [ ] Make primitive
Commissionstruct to take over intostaking& implement this innomination-pools?