20,000 USDC
View results
Submission Details
Severity: gas

lender cant be zero address for many reasons

Summary

waste of gas since lender can be 0 address

Vulnerability Details

the other checks in borrow function don't allow a nonexistent loan from being borrowed

if (loanRatio > pool.maxLoanRatio) revert RatioTooHigh();

A nonexistent loan will have 0 above causing the function to revert anyway. Plus the load object is deleted the loan terms and debt is cleared.

Impact

Tools Used

Recommendations

remove the address(0) check,waste of gas

Support

FAQs

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