Closed c4-bot-8 closed 7 months ago
0xA5DF marked the issue as primary issue
Given the nature of laons, renegotiating a loan to a principal lower than interest accrues seems highly unlikely but would consider this.
I think this is a low btw
@0xend Sponsors can only use these labels: sponsor confirmed, sponsor disputed, sponsor acknowledged.
0xA5DF changed the severity to QA (Quality Assurance)
Given the nature of laons, renegotiating a loan to a principal lower than interest accrues seems highly unlikely but would consider this.
Marking as low due to this. If the warden can prove that this scenario is at least somewhat likely to happen I'd consider reinstating med severity.
0xA5DF marked the issue as grade-c
Lines of code
https://github.com/code-423n4/2024-04-gondi/blob/b9863d73c08fcdd2337dc80a8b5e0917e18b036c/src/lib/loans/MultiSourceLoan.sol#L195
Vulnerability details
Impact
In the
refinanceFull()
function, if the borrower is the caller, it signifies a renegotiation offer. The borrower will clear the accrued interest, permitting them to repay the accrued interest without waiting for the full loan repayment.However, if
netNewLender < totalAccruedInterest
, there's a risk of overflow. Consequently,refinanceFull()
will revert, preventing the borrower from accepting the renegotiation offer.Proof of Concept
Consider the following scenario:
refinanceFull()
and passes in Bob's renegotiation offer, it reverts because:Tools Used
Manual Review
Recommended Mitigation Steps
Consider deducting only
min(netNewLender, totalAccruedInterest)
fromnetNewLender
.Assessed type
Under/Overflow