Repaying Loans
Borrowers who have had their loan requests accepted by lenders in a market, have three options when it comes to repaying their active loans:
Pay the mimum amount due
Pay the remaining amount owed
Pay a custom amount
Repaying a loan
Repay minimum amount due
/**
* @notice Function for users to make the minimum amount due for an active loan.
* @param _bidId The id of the loan to make the payment towards.
*/
function repayLoanMinimum(uint256 _bidId)
To keep a loan in good standing, borrowers can make the minimum payment directly to their active loan, due at scheduled payment cycles (set by the owner of the underlying market).
The minimum amount due calculation can be found here.
Repay full loan
/**
* @notice Function for users to repay an active loan in full.
* @param _bidId The id of the loan to make the payment towards.
*/
function repayLoanFull(uint256 _bidId)
For situations where the loan is to be repaid in its entirety, the borrower can call the repayLoanFull
method which repays the total owed principal and interest from the users wallet.
Repay partial amount
/**
* @notice Function for users to make a payment towards an active loan.
* @param _bidId The id of the loan to make the payment towards.
* @param _amount The amount of the payment.
*/
function repayLoan(uint256 _bidId, uint256 _amount)
Borrowers can also repay special amounts at any point using the general repayLoan
method by specifying the amount they would like to repay.
Last updated