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

using x=x+y is more gas efficient than x+=y

Summary

using x=x+y is more gas efficient than x+=y

Vulnerability Details

x += y/x -= y costs more gas than x = x + y/x = x - y for state variables .

Impact

save 20 gas unit per instance
gas saved = 20 * 10 = 200

Tools Used

manual review

Recommendations

use x=x+y instead of x+=y

Support

FAQs

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