DittoETH

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

Consider using descriptive `constant`s when passing zero as a function argument

Summary

Consider using descriptive constants when passing zero as a function argument

Vulnerability Details

Passing zero as a function argument can sometimes result in a security issue (e.g. passing zero as the slippage parameter).

File: contracts/facets/OwnerFacet.sol
//@audit parameter number 4 starting from left
91: LibShortRecord.createShortRecord(
asset, address(this), SR.FullyFilled, 0, 0, 0, 0, 0
);
//@audit parameter number 5 starting from left
91: LibShortRecord.createShortRecord(
asset, address(this), SR.FullyFilled, 0, 0, 0, 0, 0
);
//@audit parameter number 6 starting from left
91: LibShortRecord.createShortRecord(
asset, address(this), SR.FullyFilled, 0, 0, 0, 0, 0
);
//@audit parameter number 7 starting from left
91: LibShortRecord.createShortRecord(
asset, address(this), SR.FullyFilled, 0, 0, 0, 0, 0
);

Impact

Tools Used

Manual

Recommendations

Consider using a constant variable with a descriptive name, so it's clear that the argument is intentionally being used, and for the right reasons.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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