core
core copied to clipboard
Reduce the maximum supply cap by a percentage determined by governance
Summary of changes
Good morning! Guys, I'm sending a code that reduces the supply safely if you open the markt swap. Everything is explained in the link below:
https://medium.com/@igorsoares_41904/reduce-the-maximum-supply-cap-by-a-percentage-determined-by-governance-951695ca37bc
If possible, please test.
Attention needs to be deployed also on the burn rate, because if you have burn rate, you need to reduce the total maximum supply. But do not add the calculation with a percentage, but subtract the value burned by the maximum supply limit. it would be something like this:
amount:= burnTax supplyMaxDescending := k.GetSupplyMaxDescending(ctx, []byte("SupplyMaxDescending"+offerCoin.Denom)) k.SetSupplyMaxDescending(ctx, []byte("SupplyMaxDescending"+offerCoin.Denom), supplyMaxDescending.Sub(amount.TruncateInt()))
Report of required housekeeping
- [ ] Github issue OR spec proposal link
- [ ] Wrote tests
- [ ] Updated API documentation (client/lcd/swagger-ui/swagger.yaml)
- [ ] Added a relevant changelog entry: clog add [section] [stanza] [message]
(FOR ADMIN) Before merging
- [ ] Added appropriate labels to PR
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
- [ ] Confirm added tests are consistent with the intended behavior of changes
- [ ] Ensure all tests pass