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

When sending fees, it should be checked that `fees != 0`

Summary

Upon sending fees to the feeReceiver it should be checked that fees != 0.

Vulnerability Details

Some tokens revert on zero-value transfers. Considering both borrowerFee and lenderFee could be changed to 0 and loan's could happen for short-enough time for interest to round down to 0, it is completely possible for fees' value to be 0. If token which reverts on zero-value transfer is used, the transaction will revert and users will be unable to borrow, repay, giveLoan, buyLoan, seizeLoan.

Impact

Users' transactions will revert and they'll be unable to call borrow, repay, giveLoan, buyLoan, seizeLoan.

Tools Used

Manual review

Recommendations

Upon sending fees, make sure it is a non-zero value.

Support

FAQs

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

Give us feedback!