What
The admin can call set_max_supply to increase the token supply cap to any value without governance, timelock, or any form of checks and balances.
Why
Combined with mint(), this means the admin can mint unlimited tokens at any time. A compromised admin key could inflate the token supply arbitrarily, destroying token value. This is a significant centralization risk for any production deployment.
Scope
- Add a governance mechanism (e.g., multi-sig requirement, timelock, or hard cap)
- Consider a maximum increase per call (e.g., cannot increase by more than 2x)
- Consider a timelock delay before changes take effect
- Document the chosen approach
Technical Context
- File:
contracts/learn-token/src/lib.rs (lines ~453-464)
set_max_supply currently only requires admin auth
- The supply cap directly affects tokenomics and user trust
Acceptance Criteria
What
The admin can call
set_max_supplyto increase the token supply cap to any value without governance, timelock, or any form of checks and balances.Why
Combined with
mint(), this means the admin can mint unlimited tokens at any time. A compromised admin key could inflate the token supply arbitrarily, destroying token value. This is a significant centralization risk for any production deployment.Scope
Technical Context
contracts/learn-token/src/lib.rs(lines ~453-464)set_max_supplycurrently only requires admin authAcceptance Criteria
set_max_supplycannot be increased without additional safeguards