Skip to content
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

Closed
4 tasks
hendrikhofstadt opened this issue Feb 14, 2019 · 9 comments · Fixed by #3654
Closed
4 tasks

x/mint: Inconsistency between spec and code #3646

hendrikhofstadt opened this issue Feb 14, 2019 · 9 comments · Fixed by #3654
Assignees
Labels

Comments

@hendrikhofstadt
Copy link
Contributor

hendrikhofstadt commented Feb 14, 2019

x/mint is currently using stakeKeeper's totalPower as base value for inflation.

That means that only bonded tokens are inflated while the doc states that the total supply will be inflated.

totalSupply := k.sk.TotalPower(ctx)

Calculate the annual provisions based on current total supply and inflation

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

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adrianbrink
Copy link
Contributor

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.

@1xCL
Copy link

1xCL commented Feb 14, 2019

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.

@mdyring
Copy link

mdyring commented Feb 14, 2019

Just chiming in: Fully agree that annual provisions should be calculated based on total supply to incentivize bonding.

@terencesflam
Copy link

terencesflam commented Feb 14, 2019

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.

@FelixLutsch
Copy link

Ref: #3634

In this thread @rigelrozanski also confirms that inflation should be calculated on the total supply.

@crainbf
Copy link

crainbf commented Feb 14, 2019

Agree. That's also the way it is in the whitepaper and how it was always communicated.

@cwgoes cwgoes self-assigned this Feb 14, 2019
@cwgoes
Copy link
Contributor

cwgoes commented Feb 14, 2019

Thanks @hendrikhofstadt - the original whitepaper copy was a bit vague, but we agree and will change inflation to be relative to total supply.

@rigelrozanski
Copy link
Contributor

shucks... great catch folks, this is a bug

@jessysaurusrex
Copy link
Contributor

jessysaurusrex commented Feb 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants