Submitted by pmerkleplant
The ability of a borrower to repay a loan is disabled if the interest rate is
set too high by the InterestRateModel.
However, there is neither a check when setting the interest rate nor an
indication in the IInterestRateModels specs of this behavior.
But this issue could also be used in an adversarial fashion by the
FixedInterestRateModel-owner if he/she would disable the repay functionality
for some time and enables it at a later point again with the demand of a
higher interest to be paid by the borrower.
If an account wants to repay a loan, the function
UToken::_repayBorrowFresh() is used. This function calls
UToken::accrueInterest() (line 465)
which fetches the current borrow rate of the interest rate model
(line 546
and line 330).
The function UToken::borrowRatePerBlock() requires an not absurdly high
rate, or fails otherwise (line 331).
However, there is no check or indicator in FixedInterestRateModel.sol to
prevent the owner to set such a high rate that effectively disables repay
of borrowed funds (line 36).
Disallow setting the interest rate too high with a check in
FixedInterestRateModel::setInterestRate().
kingjacob (Union) confirmed
GalloDaSballo (judge) commented:
