Skip to content

feat: coin issuer uses percentage of total supply#17738

Merged
LHerskind merged 1 commit intonextfrom
mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate
Oct 21, 2025
Merged

feat: coin issuer uses percentage of total supply#17738
LHerskind merged 1 commit intonextfrom
mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate

Conversation

@just-mitch
Copy link
Collaborator

@just-mitch just-mitch commented Oct 15, 2025

Redesign CoinIssuer to use annual percentage-based minting budgets

This PR redesigns the CoinIssuer contract to implement a more sophisticated token issuance model:

  • Replaces the continuous rate-based minting with a discrete annual budget system
  • Budgets are calculated as a percentage of total supply at the start of each year
  • Implements a "use-it-or-lose-it" model where unused budget is lost when crossing year boundaries
  • Enables proper compounding as each year's budget is based on the actual supply at that time
  • Sets a hard cap of 20% annual inflation in the deployment script

The implementation includes:

  • New state variables to track current year, budget, and cumulative minted amount
  • Logic to handle year boundary transitions and budget recalculation
  • Comprehensive test coverage for various scenarios including partial minting, year transitions, and skipping years

This approach provides more predictable token issuance with clear annual caps while still allowing flexibility in the actual minting schedule within each year.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@just-mitch just-mitch force-pushed the mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate branch from 3b3c32d to 5e7ecf9 Compare October 15, 2025 19:33
@just-mitch just-mitch marked this pull request as ready for review October 15, 2025 19:36
@just-mitch just-mitch force-pushed the mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate branch from 5e7ecf9 to 12d4f5c Compare October 15, 2025 20:24
@LHerskind LHerskind force-pushed the mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate branch 2 times, most recently from cf3af3d to 55c8ab8 Compare October 20, 2025 19:52
@LHerskind LHerskind force-pushed the mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate branch from 55c8ab8 to 124fa94 Compare October 21, 2025 09:41
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to keep is slightly more limited in extra storage and to better reuse functions. Would prefer another pair of eyes since I made those changes.

@LHerskind LHerskind added this pull request to the merge queue Oct 21, 2025
Merged via the queue into next with commit 4a2218a Oct 21, 2025
15 checks passed
@LHerskind LHerskind deleted the mitch/tmnt-435-change-coinissuer-to-take-an-annualized-rate branch October 21, 2025 14:04
@AztecBot
Copy link
Collaborator

✅ Successfully cherry-picked 1 commit(s) to backport staging branch backport-to-v2-staging.

spalladino added a commit that referenced this pull request Oct 28, 2025
This PR accumulates backport commits throughout the day and will be
auto-merged overnight.

Latest backport: #17807 - fix: load masked values

🤖 This PR is managed automatically by the backport workflow.
- #17785 - fix: Handle invalid ecdsa signatures
- #17824 - chore: update zkpassport version to 0.10.0
- #17836 - chore: More mainnet config
- #17738 - feat: coin issuer uses percentage of total supply
- #17984 - chore: minor contract fixes

---------

Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: saleel <13466197+saleel@users.noreply.github.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: LHerskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants