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

Can use == when checking uint

Summary

Can use == when checking uint

Vulnerability Details

48: if (_amount <= 0) {
61: if (_amount <= 0) {

Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol

Tools Used

Manual inspection

Recommendations

Consider doing if (_amount == 0) {

Support

FAQs

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