In both the Ditto.sol and Asset.sol, the constructors accept an address parameter diamondAddr
to initialize the diamond state variable. However, there is no check to ensure that the provided addresses are not zero addresses.
For Ditto.sol:
For Asset.sol:
Same with VaultFacet.sol constructor:
Failing to validate the address could lead to issues during contract deployment and subsequent operations.
Invalid Contract State: Deploying the contract with a zero address could lead to an invalid contract state that may disrupt the normal functioning of the protocol.
Add Zero Address Checks: Implement a require statement in both constructors to check that the diamondAddr is not a zero address.
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.