Why use this
You can always track burns by readingtotalBurned() on each token. But the BurnManager adds:
- Source attribution: was this burn from the AMM, slashing, or governance?
- Single read: one event log to subscribe to instead of N
- Display-friendly: dashboards aggregate burn velocity across all sources
Read methods
totalBurned() view returns (uint256)
All-time burned tokens, summed across all sources, in wei.
burnsBySource(uint8 source) view returns (uint256)
Burned amount filtered by source enum:
0 = AMM_SWAP1 = SLASHING2 = GOVERNANCE3 = OTHER
Write methods (authorized contracts only)
recordBurn(address token, uint256 amount, Source source) external
Called by registered source contracts (AMM pool, ValidatorRegistry, etc.) after they execute the burn on the underlying token. Just records — does not call burn() itself.