Normal Behavior:
The withdrawTokens function allows the contract owner to transfer ERC20 tokens from the contract to a specified address. It should ensure:
The transfer succeeds reliably for all ERC20 tokens, including those that do not return a boolean (USDT, Tether style).
The destination address is valid.
The contract has sufficient balance.
Observed Issue:
The current implementation uses a direct call to IERC20.transfer, which is unsafe:
Problems:
Some tokens (e.g., USDT) do not return bool on transfer, leading to silent failures.
No check for zero address → can burn tokens.
No balance check → can revert unexpectedly or allow misconfiguration.
Event parameters order is inconsistent with standard usage.
Likelihood:
Owner-triggered function, so attack surface is limited.
Still, misconfigured or unsupported tokens can lead to silent failures.
Impact:
Tokens may remain trapped in the contract due to silent failures.
Transferring to address(0) can burn tokens unintentionally.
Users or protocol could lose tokens during emergency withdrawals.
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.