_transferNormal ERC20 transfers should revert if the recipient's balance overflows the maximum uint256 value.
The _transfer function in ERC20Internals.sol uses assembly to perform arithmetic operations without checking for overflow, allowing a recipient's balance to wrap around.
Likelihood:
High // Any user can transfer tokens to another user (or themselves) to trigger this if they have enough tokens to cause an overflow when added to the recipient's balance.
Impact:
High// A user's balance can be manipulated to wrap around to a small number, or if exploited carefully, could disrupt token accounting.
High// Violates the ERC20 standard invariant that total supply matches the sum of balances (if totalSupply doesn't track this wrap-around, though totalSupply isn't updated in transfer).
The mitigation involves manually checking for overflow after the addition. In Yul, add(a, b) wraps on overflow. By checking if the result is less than one of the operands (e.g., newToAmount < toAmount) we can detect if an overflow occurred and revert the transaction.
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.