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

Input arrays with mismatched length will make giveLoan to throw

The giveLoan function, in charge of allowing lenders to transfer loan (loanIds) to give to a respective pool (poolIds), simultaneously iterates over both arrays based on the length of just one of them (loanIds). If the number of elements in poolIds is less than that in loanIds, the whole transaction will be reverted for attempting to access an out-of-bounds index.
The whole transaction will be reverted

Recommendations

Consider including a require clause with an explicit error message to check for matching array length.

Support

FAQs

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