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

[I-4] Use scientific notation (e.g. `1e18`) rather than exponentiation (e.g. `10**18`)

Summary

While the compiler knows to optimize away the exponentiation, it's still better coding practice to use idioms that do not require compiler optimization, if they exist

Vulnerability Details

Instances (3):

File: src/Lender.sol
246: uint256 loanRatio = (debt * 10 ** 18) / collateral;
384: uint256 loanRatio = (totalDebt * 10 ** 18) / loan.collateral;
618: uint256 loanRatio = (debt * 10 ** 18) / collateral;

Impact

Tools Used

Recommendations

Support

FAQs

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