Loan repayment process is initialized from borrower (holder of Borrower Note).
- The borrower initiates loan repayment by calling repay or repayPart() function on RepaymentController with loanId.
For borrowers without installment payments, single payment loans use the repay() function to pay back a loan.
Loan data is retrieved from LoanCore and the specified repayment amount is collected from the borrower.
RepaymentController then passes the repayment information to LoanCore to update the loan state on chain. When repaying a single payment loan, users must repay the loan in full (plus interest). Repayment controller then transfers specified ERC20 payable currency to LoanCore.
repayPart(), repayPartMiniumum() closeLoan()
- Upon repayment, LoanCore executes a call and burns the lender and borrower notes.
- On the Borrower side, if the outstanding collateral is a single NFT, the asset is re-distributed back to the owner of the burned BorrowerNote. If the outstanding collateral is in an AssetVault, the AssetVault's ERC721 token representing the bundle of assets is re-distributed back to owner of the burned BorrowerNote and they are able to withdraw the assets.
- On the Lender side, the loan's principal and interest in the form of the payable ERC20 token stipulated in loan terms is re-distributed to the owner of the burned LenderNote.
Updated 11 months ago