DittoETH

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

Missing zero address check in ShortRecordFacet

Vulnerability Details

  • Vulnerability ID: M-06

  • Description: In ShortRecordFacet.sol:26, there is no check for _cusd not being the zero address.

  • Code Snippet:

    contract ShortRecordFacet is Modifiers {
    ...
    address private immutable cusd;
    constructor(address _cusd) {
    cusd = _cusd;
    }

Impact

This vulnerability can potentially lead to unintended behavior within the smart contract if a zero address is passed as _cusd during deployment.

Tools Used

Manual Review

Recommendations

Implement a check in the constructor to ensure that _cusd is not the zero address:

// ...
constructor(address _cusd) {
if (_cusd == address(0)) revert Errors.ParameterIsZero();
cusd = _cusd;
}
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.