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

No check if arrays `loanIds` & `poolIds` are same length in function `giveLoan`

Summary

No check in place to compare that the length of both arrays in function function giveLoan(uint256[] calldata loanIds, bytes32[] calldata poolIds).

Impact

If not given the same amount of inputs, leading to difference in length of arrays, function will revert.

Tools Used

Manual Review

Recommendations

Something of this sort should work:

if (loanIds.length != poolIds.length) {
revert arraysNotSameLength();
}

Support

FAQs

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

Give us feedback!