There are certain ERC20 tokens which revert on zero value transfers. If fee price is 0, borrower will be able to do refinance as the transaction will always revert.
In refinance(Refinance[] calldata refinances), fee can becomes 0 if debt - debtToPay is too small:
Assuming Alice tries to refinance a loan, the loanToken has small decimals so let's say debt is 1000 and debtToPay is 900, then fee would be 0 due to precision loss. However theloanToken is going reverts on 0 value transfers. The refinance transaction reverts and Alice is unable to refinance.
Borrower can't refinance the loan.
Manual Review
To address this issue, it is recommended to not to transfer to the fee receiver is fee 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.