In MarginCallPrimaryFacet.sol:30, the constructor of the contract sets the cusd address using the _cusd parameter. However, there is no check ensuring that _cusd is not the zero address.
Snippet:
If the _cusd address is mistakenly set to the zero address, it could cause various functionalities of the contract that rely on the cusd address to malfunction.
Manual Review
It is strongly recommended to add a check in the constructor to ensure that _cusd is not the zero address. This can be achieved with a simple require statement:
By adding this check, it will prevent the contract from being deployed with an invalid cusd 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.