The issue arises from the possibility of users mistakenly entering the zero address (0x000...
) as the recipient (to
) address when calling the unwrapAndSendETH
function in the UnwrapAndSendETH
contract. This oversight can result in the loss of funds as the ETH transferred to the zero address cannot be recovered.
If a user mistakenly provides the zero address as the recipient when calling the unwrapAndSendETH
function, the ETH transferred from the contract will be irreversibly lost. This can lead to financial losses for the user and may impact the usability and trustworthiness of the contract.
To mitigate this issue, the following steps can be taken:
Input Validation: Implement input validation to ensure that the to
address provided is not the zero address and is a valid Ethereum address format.
E.g new code will look like this:
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.