An AMM/pool mints LP shares to the first provider without burning a MINIMUM_LIQUIDITY amount to address(0). The first LP can then manipulate the share price via a tiny supply, enabling an inflation attack on later providers.
// first mint gives attacker 1 wei of LP; attacker donates tokens to the // pair to inflate reserves-per-share; next LP's mint rounds to 0 shares.
if (totalSupply == 0) {
liquidity = sqrt(amount0 * amount1) - MINIMUM_LIQUIDITY;
_mint(address(0), MINIMUM_LIQUIDITY); // permanently lock
}
Largest recorded losses in the same failure class — related, not the same bug:
The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0218 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.