# Mint/burn diverges from supply accounting

Burn or mint amount differs from the supply counter it should move, inflating or deflating backing

_Area: DeFi accounting and math bugs. Seen in 4 disclosed reports; latest 2026-09-09. Updated 2026-10-25._

## How it works
A token operation and the global supply or debt counter it is supposed to move are computed from different quantities, or one side is silently clamped, skipped, or overflowed. The invariant "tokens destroyed == counter decremented" (or "tokens created == backing added") breaks, so the contract's books no longer match reality. Every later calculation that trusts the counter — exchange rate, debt ratio, payout, escrow balance — is now wrong.

## Where it shows up
- Burn/mint helpers with a safety clamp (`if (amount > balance) amount = balance;`) and no max-difference require [E1](https://bugbountylibrary.com/r/dhl%3A20260909-zentrafinance.md)
- A function that burns one amount but calls an external accounting update with a different (partial) amount [E4](https://bugbountylibrary.com/r/cantina%3Aalchemix_may2025%3A3.1.13.md)
- Transfer hooks that mint an offsetting pair without checking the sender actually holds the token [E2](https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md)
- Bridge handlers where `from == to` (or the handler's own chain) passes the whitelist, re-minting locked value [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)
- Fixed-width counters (uint128 ladders) fed by user-controlled amounts near overflow [E2](https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md)

## How to review
For each mint/burn, trace the exact quantity into the supply counter and confirm they are the same variable, not two derived values. Check that any clamp is paired with a strict tolerance check (e.g. reject differences beyond 1 wei) so a clamp cannot silently zero a real operation [E1](https://bugbountylibrary.com/r/dhl%3A20260909-zentrafinance.md). For transferable claim tokens, verify the sender's balance is checked before minting the offset pair [E2](https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md). For bridges, confirm self-referential messages are rejected [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md). The invariant: after every operation, sum of balances equals the supply counter, and the counter equals real backing.

## Variants seen
- Clamp-to-zero burn clears debt while burning nothing [E1](https://bugbountylibrary.com/r/dhl%3A20260909-zentrafinance.md)
- Partial-vs-full amount mismatch corrupts totalSyntheticsIssued and badDebtRatio [E4](https://bugbountylibrary.com/r/cantina%3Aalchemix_may2025%3A3.1.13.md)
- Transfer mints unbacked claim pairs from empty accounts [E2](https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md)
- Self-bridge re-mints already-locked tokens [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md)

## Impact and severity
Led to free debt clearing (~140K drained) [E1](https://bugbountylibrary.com/r/dhl%3A20260909-zentrafinance.md), ~$1.73M escrow drain via overflow [E2](https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md), inflated bridged supply [E3](https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md), and underpaid redeemers with inflated bad debt [E4](https://bugbountylibrary.com/r/cantina%3Aalchemix_may2025%3A3.1.13.md). Severity rises when the corrupted counter gates payouts or is permissionless to trigger.

## Evidence
- E1: https://bugbountylibrary.com/r/dhl%3A20260909-zentrafinance.md
- E2: https://bugbountylibrary.com/r/dhl%3A20260903-notionalfinance.md
- E3: https://bugbountylibrary.com/r/c4%3A2024-08-chakra%3AM-09.md
- E4: https://bugbountylibrary.com/r/cantina%3Aalchemix_may2025%3A3.1.13.md
