Missing zero address validations is detected in smart contracts BridgeReth.sol
and BridgeSteth.sol
.
In contract BridgeReth.sol
the input parameter from
in the function deposit()
, the input parameter to
in function withdraw()
and the input parameter to
in function unstake()
are not checked if they are zero addresses. Also, the input parameter to
in function unstake()
should be checked if it is a valid address, because it is used in low-level function call
.
In contract BridgeSteth.sol
the input parameter from
in the function deposit()
, the input parameter to
in function withdraw()
and the input parameter to
in function unstake()
are not checked if they are zero addresses.
It is a good practice to check if the input addresses are zero addresses. This is because the zero address is often used as a default value in Solidity, and sending tokens to this address will effectively burn them, as they cannot be recovered. Consider adding a requirement to prevent this.
Also, the account existance in function unstake()
should be checked, the documentation says:
"The low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed."
https://docs.soliditylang.org/en/latest/control-structures.html
Manual review, VS Code
Add require()
to validate the address parameters in functions deposit()
, withdraw()
and unstake()
in contracts BridgeReth.sol
and BridgeSteth.sol
. Also, in function unstake()
in BridgeReth.sol
add check to ensure that the address to
exists.
In BridgeReth.sol
:
In BridgeSteth.sol
:
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.