Servicing and Default
This page describes the process for servicing debt and handling defaults.
Once a loan request has been cleared, an active loan exists. For the duration of the loan, the borrower can choose to repay or roll their loan. Once the loan has expired, the lender can take the loan collateral.
Repayment is relatively simple. While a loan remains active, the borrower can repay an amount of debt tokens to reclaim a pro-rata share of their collateral. For example, if a borrower requested and was lent 1,000 DAI with 2% interest, they could repay 1,020 DAI (1,000 + 2%) for all of their collateral back, 510 DAI for half their collateral back, or any other amount at the same proportions.
Repayment occurs when the borrower calls the repay() function, specifying the loan and amount of debt tokens to repay.
A borrower can also choose to roll their loan. This extends the loan at origination terms. This is done by calling the roll() function and specifying the loan identifier.
Rollover can be blocked by the lender by calling the toggleRoll() function. The current ability to roll a loan can be checked on the loans array by querying loans[loanID]. If 'rollable' is true, calling toggleRoll() as the lender will prevent the loan from being rolled over; the same is true in the inverse.
When the loan's expiry timestamp has eclipsed, the loan is considered to be in default. At this point, the borrower can no longer repay their loan to reclaim the collateral. The borrower will retain the debt tokens and the lender will claim their collateral. This is done by calling the defaulted() function and specifying the loan identifier. This function returns the amount of collateral claimed.
Last updated