Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(x/mint): Add max supply param #19896
feat(x/mint): Add max supply param #19896
Changes from 4 commits
e71305d
c7c5b8b
bd96c8e
a37274f
5b02031
d2b775f
6686b8d
ddad9ff
d38635b
2d98d3a
2bd62a5
7068d0d
6134cc5
9b68d58
f48ac00
71d9fb0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
We should also consider the burned tokens, correct?
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.
now that we use total supply from bank, supply is updated every time right?
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.
Supply doesn't track the burned tokens I guess. If it's not handled, we should track them separately?
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.
but how do we get burned tokens ?
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.
@tac0turtle @alexanderbez ?
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.
burned tokens are deducted from the total supply in bank, no need to handle anything here
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.
That's the issue right. Let's say if the max limit is m, x tokens are already burned, the new max-tokens-limit should be
m-x
sincex
were minted some of time in the history. Otherwise burning tokens doesn't make sense in this caseThere 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 always thought of it differently. That if you reduce the token then it gives you more to mint unless you reduce the total supply. I'm not sure how we will track this otherwise and on existing chains. Is there a need for this?
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.
We can just have 0 address for burning tokens. That way it will not be reduced from Total supply directly but we can have tally of burned tokens. For existing chains, if they are maintaining the data of burned tokens somewhere, they can just include in the upgrade handler to mint those tokens for 0 address. We need to change the burncoins functionality to send it to this 0 address
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.
Hmm I tend to disagree this is an overall change. It's worth talking to users first instead of making the change blindly.