20,000 USDC
View results
Submission Details
Severity: low

External calls in an unbounded `for` loop

Summary

There are external calls in an unbounded for loop.

Vulnerability Details

There are 5 instances of this issue.

File: src/Lender.sol
/// @audit transfer() on line 267
233: for (uint256 i = 0; i < borrows.length; i++) {
/// @audit transferFrom() on line 317
293: for (uint256 i = 0; i < loanIds.length; i++) {
/// @audit transfer() on line 403
359: for (uint256 i = 0; i < loanIds.length; i++) {
/// @audit transfer() on line 563
549: for (uint256 i = 0; i < loanIds.length; i++) {
/// @audit transferFrom() on line 642
592: for (uint256 i = 0; i < refinances.length; i++) {
File Link Instance Count Instance Links
Lender.sol 5 233,293,359,549,592

Impact

Using external calls in an unbounded for loop may result in a denial of service (DOS).

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Consider limiting the number of iterations in for loops that make external calls.

Support

FAQs

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