The emergencyWithdrawERC20
function does not validate the _amount
, allowing zero-value withdrawals. This leads to unnecessary gas consumption when _amount
is 0.
Unnecessary Transaction: When _amount
is 0, the transfer has no effect. However, the call still executes, wasting resources.
Gas Cost: Even a zero-value safeTransfer
costs gas due to function execution overhead. This can be avoided entirely.
Likelihood:
High: This issue will occur every time the function is called with _amount == 0
Impact:
Increase gas cost
Add a check to revert when _amount == 0
:
This prevents pointless transfers and aligns function behavior with expected emergency-only usage.
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.