In multiple for loops you access the .length if an array in every loop iteration.
for example in BorrowerOperations line 873, 920, 929,930 and more...
This is a waste of gas and could easily be reduced by saving the length in a local variable
Proof of Concept
Checked on Remix
Tools Used
Manual code review
Recommended Mitigation Steps
Save the length in a local variable right before entering the loop and iterate over it instead
Handle
certora
Vulnerability details
Impact
In multiple for loops you access the
.length
if an array in every loop iteration. for example in BorrowerOperations line 873, 920, 929,930 and more... This is a waste of gas and could easily be reduced by saving the length in a local variableProof of Concept
Checked on Remix
Tools Used
Manual code review
Recommended Mitigation Steps
Save the length in a local variable right before entering the loop and iterate over it instead