15,000 USDC
View results
Submission Details
Severity: low

Duplicated code block in DecentralizedStableCoin

Summary

The following block of code appears in both methods of DecentralizedStableCoin contract:

if (_amount <= 0) {
revert DecentralizedStableCoin__MustBeMoreThanZero();
}

Vulnerability Details

n/a

Impact

n/a

Tools Used

Manual review

Recommendations

Please consider extracting the duplicated block of code to a modifier:

modifier moreThanZero(uint256 _amount){
if (_amount <= 0) {
revert DecentralizedStableCoin__MustBeMoreThanZero();
}
_;
}

Support

FAQs

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