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

## [G-04] ++i COSTS LESS GAS THAN i++, ESPECIALLY WHEN IT’S USED IN FOR-LOOPS (--i/i-- TOO)

Summary

[G-04] ++i COSTS LESS GAS THAN i++, ESPECIALLY WHEN IT’S USED IN FOR-LOOPS (--i/i-- TOO)

file: /src/Lender.sol
233 for (uint256 i = 0; i < borrows.length; i++) {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L233

file: /src/Lender.sol
293 for (uint256 i = 0; i < loanIds.length; i++) {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L293

file: /src/Lender.sol
359 for (uint256 i = 0; i < loanIds.length; i++) {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L359

Support

FAQs

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