The withdrawTokens function calls IERC20(token).transfer(to, amount) and ignores the returned boolean. Many ERC‑20 tokens are non‑standard (e.g. some older stablecoins) and either (a) return nothing (not bool), (b) return false on failure, or (c) have unusual behavior. Calling transfer without checking its return value or using a compatibility wrapper can allow token transfers to silently fail or behave unpredictably.
Likelihood:
Occurs in real usage when interacting with non‑standard or edge‑case ERC‑20 tokens. Typical scenarios include:
Using older or popular tokens that omit a boolean return (examples: legacy stablecoins historically deployed with different semantics).
Interacting with tokens that return false on failed transfers rather than reverting.
Impact:
Token withdrawals appearing successful while recipient receives no tokens, producing inconsistent bookkeeping.
Adopt OpenZeppelin’s SafeERC20 and use safeTransfer for all ERC‑20 interactions:
Add: import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; using SafeERC20 for IERC20;
Replace: IERC20(token).transfer(to, amount); with IERC20(token).safeTransfer(to, amount);
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.