Arithmetic inside an unchecked { } block bypasses Solidity 0.8 overflow protection. If a subtraction or addition there can be driven past its bounds by input, it silently wraps — e.g. a balance underflows to a near-max value.
// unchecked { balances[msg.sender] -= amount; } // call with amount > balance -> wraps to ~2**256 // attacker now shows a colossal balance and drains the pool.
// keep only proven-safe math unchecked; validate first require(balance >= amount, "underflow"); unchecked { balance -= amount; } // safe only after the check
Largest recorded losses in the same failure class — related, not the same bug:
The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0121 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.