Closed PaddyMc closed 2 years ago
Hey! Thanks for the PR.
As I mentioned in a comment in #104, we're already dealing with microtokens, and the numerical outcome in terms of supply matches the simulations we ran.
But! We actually introduced a bug when dealing with year 0, so thank you for letting us know! It's now fixed in #104.
Description
Issue 1
The current minting algorithm is minting nothing the for the first year as
The fix is just checking if we're in year 1 or not
Issue 2
After fixing Issue 1, the mint algo was minting the full inflation rewards every block as
The fix is (inflation amount / number of blocks per year)
How to test
make start-dev
First, get the validator operation address:
elestod query staking validators --output json | jq '.validators[].operator_address'
elestovaloper1kqnueqfsat86kkjw0cjzn9lk7e2t4r0aumnmj9
At each height
elestod query bank total
=> will increase by 5 each blockelestod query distribution community-pool --output json | jq
=> will increase by 0.1 each blockelestod query distribution validator-outstanding-rewards elestovaloper1kqnueqfsat86kkjw0cjzn9lk7e2t4r0aumnmj9 --output json | jq
=> will increase by 4.9 each block