Lender.sol - DoS Vulnerability in Refinance with USDT Small Debt Difference
The refinance function calculates a fee based on the difference between the debt and debtToPay values. However, if this difference is small and falls below a certain threshold, the calculated fee may become zero, leading to a zero transfer of USDT tokens, which is not supported by the USDT token contract. As a result, the transaction reverts, causing a DoS vulnerability during the refinancing process.
When this occurs, the borrower is subject to a DoS attack, as the refinancing process will fail for the entire loop. This can lead to significant gas wastage, especially if the loop is large.
Manual Review
To mitigate this issue, it is recommended to skip executing the transfer if the fee is zero, preventing the transaction from reverting and avoiding the DoS vulnerability during the refinancing process.
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.