The new loan offer must have an interest rate at least as good as the current loan's
The new loan offer's collateral amount required must not be higher than the current loan's
But there is 1 missing conditions to be fulfilled which is to check the loan.startTime + loan.minimumDuration must be greater than or equal block.timestamp + proposal.duration.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
The borrower call acceptLoanOffer with proposal.duration = 604800 (1 week) which create a new loan with minimumDuration of 604800.
After 6 days has passed, the borrower need 1 more week.
The borrower decided to refinance with current loan to new loan (Proposal) with the duration of 604800.
The refinance went succesfully because there are no checks around the duration between loan and the proposal.
Borrower has an additional loan duration of 7 days.
Borrower done it multiple times until the collateral price drops or they don't want to repay the debt to get their collateral anymore.
Impact
The borrower has the ability to extend their loan duration as much as they want. Moreover, this condition allow borrowers to refinance their loan and chose the longer duration to extend their loan duration even until forever without being liquidated.
Nave
Medium
Borrowers Will Have The Ability To Extend The Loan Duration As They Like
Summary
The missing check for loan and proposal duration will cause borrower to extend their loan duration as they like.
Root Cause
In
PredictDotLoan::_refinance
, below conditions have been fulfilled. PredictDotLoan::_refinanceBut there is 1 missing conditions to be fulfilled which is to check the
loan.startTime + loan.minimumDuration
must be greater than or equalblock.timestamp + proposal.duration
.Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
acceptLoanOffer
withproposal.duration = 604800
(1 week) which create a new loan withminimumDuration
of604800
.Impact
The borrower has the ability to extend their loan duration as much as they want. Moreover, this condition allow borrowers to refinance their loan and chose the longer duration to extend their loan duration even until forever without being liquidated.
PoC
No response
Mitigation