Skip to content

Commit

Permalink
fix(mint): provide annual inflation rate
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Oct 7, 2022
1 parent 25316e5 commit a5005f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/mint/okp4InflationCalculationFn.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var (
// See: https://docs.okp4.network/docs/whitepaper/tokenomics#staking-rewards
func Okp4InflationCalculationFn(ctx sdk.Context, minter minttypes.Minter, params minttypes.Params, _ sdk.Dec) sdk.Dec {
year := uint64(ctx.BlockHeight()) / params.BlocksPerYear
inflationForYear := initialInflation.Mul(params.InflationRateChange.Power(year))

return inflationForYear.QuoInt64Mut(int64(params.BlocksPerYear))
return initialInflation.Mul(params.InflationRateChange.Power(year))
}

0 comments on commit a5005f6

Please sign in to comment.