DittoETH

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

Missing Zero Address Checks in Constructor

Summary

In several contract within the DittoETH protocol, there are missing checks for zero addresses in the constructor. These missing checks could lead to unexpected scenarios.

Vulnerability Details

The missing zero address checks are present in various functions within the protocol's contracts. Specifically, in the constructor functions of several contracts, there is a lack of checks to ensure that certain addresses provided as parameters are not set to the zero address (address(0)). Failing to validate these addresses could result in unexpected behavior in the protocol.

Tools Used

Manual Review

Recommendations

Add zero address checks

constructor(address _ditto) {
+ require(_ditto != address(0), "Ditto address cannot be zero address");
DITTO = IAsset(_ditto);
}

https://github.com/Cyfrin/2023-09-ditto/blob/main/contracts/facets/YieldFacet.sol#L30C1-L32C6

Updates

Lead Judging Commences

0xnevi Lead Judge
about 2 years ago
0xnevi Lead Judge about 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.