Loan Repayment

It is a common scenario for users to want to repay their loan in full. During the time between submitting the repay TX and it actually being executed, interest might be accrued thus causing the repay amount provided to not repay the loan in full. To prevent this users are forced to send a slightly larger repay amount to the market contract. Now any remainder is given back to the user when the repay amount > borrow balance.

Note that this is not implemented for liquidations.

Example: If a user has borrowed 100 SSCRT and repays 101 SSCRT, the contract will then send them back the change: 1 SSCRT. This will prevent the loss of funds when repaying loans.

Last updated