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

Use == for uints check instead of <= 0

Summary

Use == for uints check instead of <= 0

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

Code Review using VSCode

Recommendations

Update the code to: if (_amount == 0) {

Support

FAQs

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