DittoETH

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

Missing constructor cUsd zero-address checks

Summary

There is a missing check in a number of facets that cusd is not a zero address which could allow immutable cusd to be mistakenly set to 0 address.

Vulnerability Details

The constructors in the following facets are affected:
ExitShortFacet
MarginCallPrimaryFacet
ShortRecordFacet

Impact

Any function using the immutable state variable cusd will not work as expected.

Tools Used

Manual Code Review

Recommendations

Add zero address check to the constructor for three facets; ExitShortFacet, MarginCallPrimaryFacet, ShortRecordFacet, before setting cusdto the passed in parameter_cusd```.

constructor(address _cusd) {
require(_cusd != address(0), "CUSD address cannot be zero address");
cusd = _cusd;
}
Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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