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

Check length of array inputs

Summary

Length of array inputs not checked.

Vulnerability Details

If the length of two array inputs are not equal, they may revert at the last index, and can lose a lot of gas.

Impact

Here, the i iterates over the length of loanIds. Thus if the length of poolIds is less than loanIds, it causes the whole loop to revert and a lot of gas is lost.

Tools Used

Manual Analysis

Recommendations

Check the length of two array inputs to be same if they are both used together in the function.

Support

FAQs

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