Integer division truncates. Dividing before multiplying discards the remainder and produces a materially smaller (or zero) result, letting users underpay or starving reward accounting.
uint256 reward = (amount * rewardPool) / totalStaked; // multiply first
Largest recorded losses in the same failure class — related, not the same bug:
The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0017 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.