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

the function "giveLoan" that takes two input arrays as arguments,the lengths of these arrays must be equal.

Summary

the function "giveLoan" that takes two input arrays as arguments, the lengths of these arrays must be equal.

Vulnerability Details

There is no conditional check for the lengths of arguments loanIds and arguments poolIds. The lengths must be equal.

Impact

cost more gas

Tools Used

Recommendations

function giveLoan(
uint256[] calldata loanIds,
bytes32[] calldata poolIds
) external {
if(loanIds.length!=poolIds.length){
revert ArrayLengthsNotEqual();
}
for (uint256 i = 0; i < loanIds.length; i++) {
...
...
...
}

Support

FAQs

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