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

LoanId-ındex may lost cause of gas grief

Summary

loand-ıd has no real connection with the contract.

Vulnerability Details

The exact number of events that can be emitted per transaction depends on the specific blockchain that is being used. However, it is typically around 100 events.

If the loans array becomes too large, the emit keyword will not be able to emit all of the events for the borrows. This means that some of the events may not be fired.

Impact

Losing curicial loanIDs would lead to loss of collateral cause there's no getter function for borrowed loan's and traversing the array after certain amount of length is almost impossible cause the gas needed to do the computation.

Tools Used

Foundry test-suit

Recommendations

Checking the calldata length and evaluating the gas consumption in case of gas grief and revert the tx or creating mapping that maps the loanIds where the burrower takes so this way burrower can gain his loanıds easily

Support

FAQs

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

Give us feedback!