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

Unnessesary exponentiation increases gas costs

Summary

Unnecessary exponentiation in Lender.sol incurs extra gas costs

Vulnerability Details

10 ** 18 can be hardcoded to avoid spending gas on exponentiation (on lines 246, 384, and 618).

Impact

Each exponentiation costs 60 gas (see https://github.com/wolflo/evm-opcodes/blob/main/gas.md#a1-exp), so 180 gas is saved.

Tools Used

Recommendations

Change 10 ** 18 to 1e18

Support

FAQs

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