Description:
The withdrawTokens function uses IERC20(token).transfer(to, amount).
The IERC20 interface expects a bool return value.
Some tokens (e.g., USDT) do not return a boolean.
When calling transfer on such tokens using the standard interface, the call will revert because the return data size (0 bytes) does not match the expected size (32 bytes for bool).
Impact:
The owner cannot withdraw tokens that do not follow the standard ERC20 return behavior (like USDT), leading to stuck funds.
Proof of Concept:
withdrawTokens reverts when used with a token that does not return a boolean.
Recommended Mitigation:
Use OpenZeppelin's SafeERC20 library for all token transfers.
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.