Repay Loan

Once a loan is accepted and is active, the borrower can repay the loan using one of three different functions on the TellerV2 contract:

  • Pay the minimum amount

  • Pay the full remaining amount

  • Pay a custom partial amount

In order for a repayment to succeed, the borrower must have enough of the ERC20 token in their wallet and it must be 'approved' to the TellerV2 contract.

Repaying a loan

Repay minimum amount

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.

/**
 * @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)

Repay full amount

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.

/**
 * @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)

Repay partial amount

Borrowers can repay a custom partial amount at any point by using the general repayLoan method and by specifying the specific amount they would like to repay.

/**
 * @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)

Last updated