Borrower may not be able to refinance loans if the difference between new debt and debtToPay is too small
When borrower refinances loans, if the new debt is larger than debtToPay, protocol will charge a borrower fee and transfer the fee to the fee receiver:
If the difference between new debt and debtToPay is too small, fee will be 0, for example, borrowerFee is 50 and (debt - debtToPay) is 199, then fee is 0 (50 * 199 / 10000).
This is problematic because some tokens do not support transfer if amount is 0, tranaction will revert and borrower cannot refinance.
Loans cannot be refinanced.
Manual Review
Do not transfer protocol fee is amount is 0.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.