Function giveLoan() doesn’t check whether loanIds and poolIds arrays have the same length.
There is no check if loanIds.length and poolIds.length are equal. To match the selling loan to the new pool.
If loanIds array is longer the function will revert when checking if pool.loanToken != loan.loanToken because all of the pool members will be default and pool.loanToken will be equal to zero address.
Manual
Add a check in the start of the function to confirm that loanIds and poolIds have equal length.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.