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

Use `!= 0` instead of `> 0`

Summary

It is cheaper to use != 0 than > 0

Vulnerability Details

Using > 0 uses slightly more gas than using != 0. Use != 0 when comparing uint variables to zero, which cannot hold values below zero

Impact

Gas Consumption

Tools Used

Recommendations

Replace > 0 with != 0 to save gas.

Support

FAQs

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