The lender gives a loan by buying rcTokens from the borrower or a DEX pool (ex. Swapping Dai for rcTokens)
They receive rcTokens which represents the right to collect payments (ex. Dai) or forfeited collateral (ex. wBTC) after expiry.
After expiry, the lender can use the rcToken to collect payments and interests with Ruler Protocol in the form of the paired token (ex. Dai).
Lender gives a loan by buying rcTokens through the DEX pool
Lender receives rcTokens to represent the right to receive payment(s) and interest
After expiry, lender can collect loan payment(s) and interest with rcTokens.
If there is a default (the borrower does not payback the loan), the lender will return rcTokens to Ruler Protocol and collect the following assets proportionally with their share of the Ruler Pair:
Repayments from borrowers in the pair
Collateral defaulted in the pair
Taking Ruler Pair (wBTC, Dai, 12/31/2021, 10000) as an example.
1 wBTC deposited for the pair, 10,000 rTokens minted
At expiry, only half of the
RR_wBTC_10000_Dai_12_31_2021 are paid back (a default rate of 50%)
The pair now has 0.5 wBTC + 5000 Dai in the contract.
Each rcToken will be eligible to receive (0.5 wBTC + 5000 Dai) * (1 / 10,000)