The recoverTokens function does not check the return value of the ERC20 transfer call. Some tokens (like ZRX, BNB) return false instead of reverting on failure, which causes the transfer to fail silently.
In Stratax.sol:282-284, the recoverTokens function performs an ERC20 transfer without checking the return value:
In Solidity 0.8+, calling transfer through the IERC20 interface ABI-decodes the return data as bool, but the decoded value is never checked. If the token returns false on failure, the function completes successfully while no tokens are actually transferred. The owner may believe tokens were recovered when they were not.
Likelihood:
Requires a token that returns false instead of reverting on failure
Most standard ERC20 tokens revert on failure, making this uncommon
Only affects the recoverTokens function which is used for emergency token recovery
Impact:
Owner may believe tokens were recovered when the transfer actually failed
Could delay or complicate emergency recovery efforts
No direct fund loss, but tokens remain stuck in the contract with no indication of failure
The following compilable Foundry test demonstrates that recoverTokens silently succeeds when the underlying transfer returns false:
Steps:
Deploy a mock token that returns false on insufficient balance (instead of reverting)
Mint 100 tokens to the Stratax contract
Call recoverTokens requesting 1000 tokens (more than available)
The call succeeds — no revert — but zero tokens are transferred
Both tests pass, confirming the silent failure:
Use OpenZeppelin's SafeERC20 library which handles both cases — tokens returning false and tokens returning no data (e.g., USDT):
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.