Griefing vector if owner automation scripts call this function blindly
Violates common ERC20 assumptions
Reverts unintentionally
The function does not validate that _tokenAddress is non-zero. If a caller passes address(0), the function will attempt to interact with a non-existent token contract and revert. This leads to unexpected behavior and can break off-chain integrations or automation.
Likelihood:
Reason 1 Anyone can brick the function by passing address(0)
Reason 2 Creates unnecessary fragility
Impact:
Impact 1 Anyone can brick the function by passing address(0)
Impact 2 Creates unnecessary fragility
The emergencyWithdrawERC20 function lacks a check to ensure _tokenAddress is not the zero address.
While the function blocks core tokens like iWETH, iWBTC, iWSOL, and iUSDC, it does not reject address(0), which is not a valid ERC20 token.
Calling IERC20(address(0)).safeTransfer(...) results in a low-level call to a non-contract, which reverts.
This makes the function fragile, and the contract may unexpectedly revert if _tokenAddress is ever 0x0.
Add a zero-address validation at the top of the function
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.