-
Notifications
You must be signed in to change notification settings - Fork 101
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
Polkadot: Constant yearly emission #471
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
cc @gpestana |
|
||
log::debug!(target: LOG_TARGET, "params: {:?}", params); | ||
relay_common::relay_era_payout(params) |
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.
You can probably now remove some unused code from both relay_common and polkadot-sdk related to the old inflation formula.
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.
I think we are still using it in Kusama and the other relay runtimes, but yea we can remove the dynamic parameter stuff again 🙈
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
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.
The code seems to match the intention of the Wish for Change proposal 1139, which was approved by the community.
Looks good to me. The exact timing of the snapshot of the Would it be possible to include something that queries the Taking the number at the execution of the WFC is still sensible. |
FixedU128::from_rational(era_duration_millis.into(), MILLISECONDS_PER_YEAR.into()); | ||
|
||
// TI at the time of execution of [Referendum 1139](https://polkadot.subsquare.io/referenda/1139), block hash: `0x39422610299a75ef69860417f4d0e1d94e77699f45005645ffc5e8e619950f9f`. | ||
let fixed_total_issuance: i128 = 15_011_657_390_566_252_333; |
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.
code looks good here. i might take the preference to just keep this a round 15x10^18, so that numbers look clean and obvious.
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.
Yea I thought about it, but did not want to make any deliberate alterations to the proposal... It is quite fortunate that it works out to 120M by accident already i think.
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.
LGTM
Testing the approach of this before it goes live on Polkadot polkadot-fellows/runtimes#471 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Dónal Murray <[email protected]>
bot merge |
/merge |
Enabled Available commands
For more information see the documentation |
Release for the updated inflation formula from #471 This release only affects the Polkadot runtime. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Dónal Murray <[email protected]>
Sets the inflation to ~120M DOT per year as specified in Ref 1139. 15% of that goes to the treasury and the rest to stakers.
Details
This MR sets the Polkadot inflation to a fixed amount per year. The yearly increase is ~120,063,259 DOT. The amount was set to 8% of the Total Issuance at block 22810263 in which referendum 1139 was executed. You can check this for yourself:
Multiplying this by 8% and converting to DOT is about
120,093,259
DOT per year.This results in an emissions of
120,093,259 / 365.25
about328,797
DOT per day.The Total Issuance and yearly inflation look like this over the next 25 years:
Concrete numbers
Implications
15% of the inflation goes to the treasury which results in a yearly treasury inflow of ~18M DOT (1.5M DOT per month).
Stakers will receive ~102M DOT per year (~8.5M DOT per month).