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

Borrower cannot partially repay interest of a loan

Summary

The repay function of the Lender.sol contract allows a borrower to repay a loan in a specific pool. However, it is currently impossible for the borrower to partially repay the interest of a loan. This is due to the fact that the repay function calculates the lenderintrest and protocol intrest and combines them as one trascation, despite the fact that they are paid to different addresses.

Should this be the function’s intended behavior, consider explicitly documenting it in docstrings. Otherwise, consider implementing the necessary logic to seperate the transaction of lenderintrest and protocolintrest, allowing borrowers to partially repay their loan’s interest.

Vulnerability Details

Impact

Tools Used

Recommendations

Support

FAQs

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