Normal behavior: ERC20 transfers should be made via SafeERC20 (or at minimum check the boolean return) to support tokens that return false instead of reverting.
Problem: withdrawTokens calls IERC20(token).transfer(to, amount) and ignores the return value; non-standard tokens can return false and cause silent failures.
Likelihood:
Occurs when withdrawing tokens that are non-standard (historical examples include some stablecoins and older tokens).
Many integrations may interact with a wide range of ERC20s, including non-standard ones.
Impact:
Transfers may silently fail (return false) leaving tokens in contract while owner believes they were withdrawn.
Can cause lost time, mistaken accounting, or locked assets until remedied on-chain.
When withdrawTokens is called with BadTokenMock address, transfer returns false but execution continues.
Add OpenZeppelin SafeERC20 and use safeTransfer:
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.