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

Mathematical Optimization

Summary

X -= Y costs 22 more gas than X = X - Y. This can mean a lot of gas wasted in a function call when the computation is repeated n times (loops) called in repay, giveloan, refinance functions that contains loop.

Recommendations

interest -= fees;
interest = interest - fees;

Support

FAQs

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