-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
x/mint: Inconsistency between spec and code #3646
Comments
Specifically, if total supply is 100 atoms, and 50% is bonded and hence inflation is 20% then we will print 10 a year for a total inflation of 10%. If 10% is bonded and hence inflation is 20% then we will print 2 atoms a year for 2% annual inflation. The less % of the network is bonded the less the impact of inflation on the overall network will be. This would create a downward pressure on the amount of bonded atoms. |
If the inflation is from the total supply of atoms, it would definitely give more incentive for atom holders to bond their atoms when others are not bonding as it will increase their returns. |
Just chiming in: Fully agree that annual provisions should be calculated based on total supply to incentivize bonding. |
I agree that inflation should be calculated based on total supply, as this aligns to the general understanding of the term "inflation". Mathematically, we can still just inflate bonded tokens, but then the cap of inflation rate should be far higher than 20%, say 100%. But this looks bad. |
Ref: #3634 In this thread @rigelrozanski also confirms that inflation should be calculated on the total supply. |
Agree. That's also the way it is in the whitepaper and how it was always communicated. |
Thanks @hendrikhofstadt - the original whitepaper copy was a bit vague, but we agree and will change inflation to be relative to total supply. |
shucks... great catch folks, this is a bug |
Hey @hendrikhofstadt, this is a great catch. It would be cool to see it land in my HackerOne inbox! Or I can throw in a thank you bonus on the next bug you submit, up to you. |
x/mint
is currently usingstakeKeeper
'stotalPower
as base value for inflation.That means that only bonded tokens are inflated while the doc states that the
total supply will be inflated
.cosmos-sdk/x/mint/abci_app.go
Line 15 in d66db6a
cosmos-sdk/docs/spec/mint/begin_block.md
Line 33 in dfd00a6
In a discussion on Riot @adrianbrink pointed out that this clearly reduces the incentive for people to bond their ATOMs and increase the security of the network, which is a very valid point.
CC: @cwgoes @jaekwon @zmanian
For Admin Use
The text was updated successfully, but these errors were encountered: