20,000 USDC
View results
Submission Details
Severity: medium

Lender.repay can revert for tokens that doesn't support 0 transfer

Summary

Lender.repay can revert for tokens that doesn't support 0 transfer in case if protocol fee is 0

Vulnerability Details

When user borrows, then he should pay some interest. User can repay his loan using Lender.repay function. It's important that user could do that at any time. So it's possible that user would like to repay it almost at same.
In that case it's possible that protocol fee amount will be 0.

And in case if loanToken doesn't support 0 transfers, then repay will revert. As result user can't repay any time he wish.

Impact

User can't repay.

Tools Used

VsCode

Recommendations

In case if fee is 0, then don't send it.

Support

FAQs

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