DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing zero address check in ExitShortFacet can set cusd to zero

Vulnerability Details

M-04: Lack of Validation for _cusd Address

In ExitShortFacet.sol:30, the constructor of the contract assigns the passed _cusd address directly to the cusd state variable without validating if it is the zero address.

constructor(address _cusd) {
cusd = _cusd;
}

Impact

Setting the zero address for critical contract dependencies like _cusd could halt operations and cause potential loss of funds.

Tools Used

Manual Review

Recommendations

Implement a check in the constructor to ensure that the _cusd address is not the zero address before assignment.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.