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

`<x> += <y>` costs more gas than `<x> = <x> + <y>` for state variables

Summary

Using the addition operator instead of plus-equals saves gas.

Impact

File: Lender.sol
263: pools[poolId].outstandingLoans += debt;
388: pools[poolId].outstandingLoans += totalDebt;
490: pools[poolId].outstandingLoans += totalDebt;
637: pools[poolId].outstandingLoans += debt;

Support

FAQs

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