15,000 USDC
View results
Submission Details
Severity: gas
Valid

Unnecessary comparison on parameters of type uint256

Summary

The comparison <= 0 is performed on parameters of type uint256. By the definition of uint, such parameters can not be less than zero. Therefore the comparison <= 0 can be replaced by == 0. This replacement will make the comparison being performed closer to the true definition of uint256.

Impact

Funds are not at risk.

Tools Used

Manual review.

Recommendations

Change the comparison <= 0 to == 0 in DecentralizedStableCoin.sol. The changed lines will look as follows:

line 48

if (_amount == 0) {

line 61

if (_amount == 0) {

Support

FAQs

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