We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As defined in the ADR:
package mint import "time" const Year = 24 * time.Hour * 365 func BeginBlock(ctx sdk.Context) { lbi := GetLastBlockInfo(ctx) params := GetParams(ctx) timeElapsed := ctx.BlockTime().Sub(lbi.Time) if timeElapsed > params.MaxBlockDuration { timeElapsed = params.MaxBlockDuration } totalSupply := GetTotalStakingTokenSupply(ctx) totalBonded := GetTotalStakingTokenSupplyBonded(ctx) bondedRatio := totalBonded / totalSupply inflation := lbi.Inflation switch { case bondedRatio < params.MinBondedRatio: inflation += params.InflationChange * timeElapsed case bondedRatio > params.MaxBondedRatio: inflation -= params.InflationChange * timeElapsed } if inflation > params.MaxInflation { inflation = params.MaxInflation } else if inflation < params.MinInflation { inflation = params.MinInflation } lbi.Time = ctx.BlockTime() lbi.Inflation = inflation SetBlockInfo(ctx, lbi) totalCoinsToMint := (lbi.Inflation * totalSupply) * (timeElapsed/Year) for _, recp := range params.InflationRecipients { Mint(ctx, recp.Recipient, totalCoinsToMint * recp.Ratio) } }
The text was updated successfully, but these errors were encountered:
Todo:
k.rewardsKeeper.TrackInflationRewards(ctx, dappRewards[0])
k.rewardsKeeper.UpdateMinConsensusFee(ctx, dappRewards[0])
mintkbankkeeper
Sorry, something went wrong.
inflation_rewards_ratio
spoo-bar
No branches or pull requests
As defined in the ADR:
The text was updated successfully, but these errors were encountered: