sherlock-audit / 2023-02-kairos-judging

2 stars 0 forks source link

pavankv241 - borrow() function have unbounded loop leads to dos of gas.limit #169

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

pavankv241

medium

borrow() function have unbounded loop leads to dos of gas.limit

Summary

borrow() function have unbounded loop leads to dos of gas.limit

Vulnerability Detail

When user try to borrow loan with large amount of NFT's then in borrow() function there is loop where calls each NFT's OfferAgrs[] args array from stroage when user try submit large of array which leads to dos of block.gas limit.

Impact

Dos of gas limit in borrow() loop

Code Snippet

https://github.com/sherlock-audit/2023-02-kairos/blob/main/kairos-contracts/src/BorrowFacet.sol#L41

Tool used

Manual Review

Recommendation