The giveLoan() function in Lender.sol
contract, in charge of bringing the loan to new pools on the choice of the old loans' lender, 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.
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L359
Hard to know where the issue is as there is no actual message returned on failure.
Manual
Consider including a require clause with an explicit error message to check for matching array 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.