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

Missing check for equal length arrays

Summary

The giveLoan function does not check whether the lengths of the arrays submitted are equal. This can lead to unexpected results.

Impact

If one of the arrays is shorter, the additional values in the other array will be ignored. This could lead to unexpected results, which would be better served by reverting.

Tools Used

Manual review

Recommendations

Add a check to compare the length of the two arrays.

require(loanIds.length == poolIds.length, "array length not equal");

Support

FAQs

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

Give us feedback!