# Unrestricted mint and supply creation

Supply-increasing paths lacking caller authorization or a hard cap; zero-gated setters, timing-only mint gates, transfer special cases

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2025-08-21. Updated 2026-11-14._

## How it works
A mint or supply-creation path trusts something that does not actually constrain who may call it or how much can be created. The broken assumption is that a gate on *timing* or *state* also gates *identity* or *amount*. Three shapes appear: a setter gated on a value being zero that is never required to be non-zero, so it can be re-run while the value stays zero [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md); a mint gated only on same-block/concurrent spend, not on which coin is minting [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md); and a transfer function with a special case for `to == address(this)` that skips balance checks and mints [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md). In each case the caller is not the intended minter, yet the code lets supply be created.

## Where it shows up
- Setters or initializers whose require only upper-bounds a value (`<= 1e10`) but never requires it `> 0`, so they can be called repeatedly while the value stays zero [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md).
- Mint paths gated by timing primitives (concurrent-spend, same-block, deadline) with no check on the minting coin's parent/ID or caller [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md).
- `transfer`/`transferFrom` with branches like `if (to == address(this) || to == someContract) { ... }` that call a mint/transform instead of moving balances [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md).

## How to review
For every path that increases supply, ask: who is allowed to call this, and what bounds the amount? The invariant: supply can only increase through a call whose caller is authorized and whose resulting total stays within a fixed cap. Check that a zero-gated setter cannot be re-run while its gate value remains zero [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md); that a timing gate is paired with an identity/parent check on the minting party [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md); and that transfer special cases cannot reach mint logic [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md).

## How finders spotted it
- Read the require conditions on `setCollectionData` and noticed `collectionTotalSupply` was only upper-bounded, not required non-zero, so it could be re-called before supply was set; combined with `artistSignature` being callable by the current artist and immutable once set [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md).
- Code review of `crt_tail.clsp` line 135: saw `ASSERT_CONCURRENT_SPEND` constrains timing but not the minting coin's identity, then reasoned about mempool visibility and Chia's RBF mechanism to weaponize it [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md).
- (E3: how found not stated.)

## Variants seen
- Repeated call of a zero-gated setter to set a fake artist and forge signatures [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md).
- Timing-only mint gate with no constraint on the minting coin's parent/ID [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md).
- Transfer-to-self special case that mints instead of transferring [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md).

## Impact and severity
E1 forges artist signatures, undermining collection authenticity [E1](https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md). E2 lets an attacker mint a majority of CRT supply, gaining full governance control, or cheaply mint to invalidate deployment as a DOS [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md). E3 drained ~$180k of liquidity on BSC [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md). Impact rises when minted supply confers governance power [E2](https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md) or when the minted tokens are immediately swappable for pooled assets [E3](https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md).

## Evidence
- E1: https://bugbountylibrary.com/r/c4%3A2023-10-nextgen%3AM-06.md
- E2: https://bugbountylibrary.com/r/cantina%3Acircuit_puzzles%3A3.3.7.md
- E3: https://bugbountylibrary.com/r/dhl%3A20240529-metadragon.md
