Skip to content
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

Reduce inflation due to CIP-29 #43

Open
rootulp opened this issue Mar 19, 2025 · 0 comments
Open

Reduce inflation due to CIP-29 #43

rootulp opened this issue Mar 19, 2025 · 0 comments

Comments

@rootulp
Copy link
Collaborator

rootulp commented Mar 19, 2025

Context

https://github.com/celestiaorg/CIPs/blob/main/cips/cip-029.md

Problem

// cumulativeInflation returns the total amount of utia that will be minted due to inflation.
func cumulativeInflation(daysSinceGenesis int64) int64 {
if daysSinceGenesis == 0 {
return 0
}
return cumulativeInflation(daysSinceGenesis-1) + dailyInflationForDay(daysSinceGenesis-1)
}
// dailyInflationForDay returns the amount of utia that will be minted per day due to inflation.
func dailyInflationForDay(daysSinceGenesis int64) int64 {
if daysSinceGenesis == 0 {
return dailyInflationForYear(0)
}
yearsSinceGenesis := daysSinceGenesis / 365
return dailyInflationForYear(yearsSinceGenesis)
}

does not account for the reduction in inflation

Proposal

  1. Modify the code in this repo to account for CIP-29 which reduces the inflation and disinflation. The inflation reduction will take effect at the v4 activation height so we need to calculate inflation with the previous constants until that date and then use the new constants after that date.
  2. Add unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant