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

Missing check for arrays dimensions

Summary

The function giveLoan lacks explicit array length validations.

Vulnerability Detail

File: Lender.sol
function giveLoan(
uint256[] calldata loanIds,
bytes32[] calldata poolIds
) external {
for (uint256 i = 0; i < loanIds.length; i++) {

The function currently operates under the assumption that loanIds.length will always match poolIds.length. Without explicit checks, this can lead to unforseen errors.

Impact

It might lead to systemic issues, including crashes or bugs during certain operations.

Tools Used

A thorough review of the code base was conducted to identify this issue.
Forge testing

Recommendation

Check Arrays length before proceding.

Support

FAQs

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