polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.75k stars 1.55k forks source link

Adjust Polkadot inflation with auctions (once enabled) #8174

Open jacogr opened 2 years ago

jacogr commented 2 years ago

See https://github.com/paritytech/polkadot/pull/5872

kianenigma commented 2 years ago

and how is this number being computed? the comment I see from Gav when he first changed the inflation rate logic says:

// 30% reserved for up to 60 slots.
let auction_proportion = Perquintill::from_rational(auctioned_slots.min(60), 200u64);

// Therefore the ideal amount at stake (as a percentage of total issuance) is 75% less the
// amount that we expect to be taken up with auctions.
let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion);

So with 41 parachains, Kusama's ideal stake should be 75 - ~20 = 55%.

kianenigma commented 2 years ago

okay, I guess the issue is that auctions::auctionCounter is mistakenly used (54), and it is wrong. From where is the apps getting the right number of "active parachains" (41, not 54)?

jacogr commented 2 years ago

Using auctionCounter is correct, also as per the Rust codebase.

The discrepancy is most-probably related to this - https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L526-L527

The param config is literally 30% as per the comment as opposed to using 200u6 as the divisor.

Suggestion for the calcs here are always appreciated (probably not this issue, since it related to functionality adjustment, not "it doesn't quite line up") -

kianenigma commented 1 year ago

Any updates on this? it has caused some confusion here and there.

TarikGul commented 7 months ago

As a suggestion by Alex Birdo, probably best to just remove the confusion by removing the text for now then, we can add it back in when corrected.

kianenigma commented 4 months ago

Yes, happy to see this removed.