The _mint() function uses assembly code that bypasses Solidity 0.8+'s overflow protection. When totalSupply + value exceeds type(uint256).max, it wraps to a small number instead of reverting.
totalSupply wraps to a small number while balances remain large
Breaks invariant: sum(balances) == totalSupply
Enables infinite minting once supply resets
Breaks DEX/protocol integrations relying on totalSupply()
Add the test to Token.t.sol:
Run: forge test --mt test_mintOverflow -vv
Output shows totalSupply = 99 while user1 has massive balance.
Use regular Solidity instead of assembly:
Or add a max supply cap:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.