Skip to content

Commit 45831fa

Browse files
authored
Merge pull request #290 from interlay/dan/lending
feat: lending user guide
2 parents 1283261 + 28bf92a commit 45831fa

10 files changed

+106
-0
lines changed
Loading
Loading
Loading
85.7 KB
Loading
Loading
Loading
48 KB
Loading
51.2 KB
Loading

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* [Wallets / Explorers](guides/wallets-explorers.md)
2929
* [Transfers](guides/transfers.md)
3030
* [Bridge](guides/bridge.md)
31+
* [Lending](guides/lending.md)
3132
* [Staking](guides/stake.md)
3233
* [Governance](guides/governance.md)
3334
* [Crowdloans](guides/crowdloans.md)

docs/guides/lending.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Lend and Borrow
2+
3+
The lending protocol allows users to trustlessly lend and borrow. Assets that are supplied to the lending pool start earning interest immediately, and can be used as a security deposit for over-collateralized borrowing. Borrowers can repay their loan at any time, along with the interest they owe, while lenders can only withdraw their deposit if there is more liquidity left in the pool (i.e. not borrowed) than the amount to be withdrawn. Interest rates are variable and depend on the supply and demand of each asset.
4+
5+
At the end of this guide you will have:
6+
7+
- [x] [Supplied an asset and started earning interest](#_3-deposit-to-a-lending-market)
8+
- [x] [Enabled the deposit as borrow collateral](#_4-enable-the-collateral-toggle)
9+
- [x] [Borrowed using the collateral](#_5-borrow)
10+
- [x] [Repaid a loan](#_6-repay-a-loan)
11+
- [x] [Withdrawn part of the supplied amount](#_7-withdraw-a-deposit)
12+
13+
## Prerequisites
14+
15+
Make sure you have a compatible [wallet plugin](guides/wallets-explorers.md#substrate-wallets) installed.
16+
17+
## Lend and Borrow
18+
19+
### 1. Go to the lending page
20+
21+
<!-- tabs:start -->
22+
#### **Interlay**
23+
24+
Coming soon!
25+
26+
#### **Kintsugi**
27+
28+
Coming soon!
29+
30+
#### **Testnet-Kintsugi**
31+
32+
[kintnet.interlay.io/lending](https://kintnet.interlay.io/lending)
33+
34+
#### **Testnet-Interlay**
35+
36+
[testnet.interlay.io/lending](https://testnet.interlay.io/lending)
37+
<!-- tabs:end -->
38+
39+
There are three markets available in the screenshot attached. You can take a look at the various interest rates and decide which ones you are interested in supplying or borrowing.
40+
41+
![The Lending page](../_assets/img/guide/lending-page-initial.png)
42+
43+
### 2. Bring tokens for lending and transaction fees
44+
45+
You will need some tokens to pay for transaction fees (KINT on Kintsugi, INTR on Interlay). Additionally, you also need tokens to deposit into the lending pool.
46+
47+
<!-- tabs:start -->
48+
#### **Interlay**
49+
50+
A list of exchanges with INTR listings can be found on [Coingecko](https://www.coingecko.com/en/coins/interlay). Those exchanges should also have the assets in the Interlay lending markets listed.
51+
52+
#### **Kintsugi**
53+
54+
A list of exchanges with KINT listings can be found on [Coingecko](https://www.coingecko.com/en/coins/kintsugi). Those exchanges should also have the assets in the Kintsugi lending markets listed.
55+
56+
57+
#### **Testnet**
58+
59+
On testnet, you can obtain some tokens (KINT/INTR, KBTC/IBTC, KSM/DOT, USDT) by clicking on the "Tokens Faucet" button on the right-hand side of the top bar.
60+
<!-- tabs:end -->
61+
62+
### 3. Deposit to a lending market
63+
64+
Select a lending market and enter the amount you wish to supply.
65+
66+
![Lend IBTC](../_assets/img/guide/lending-page-lend-ibtc.png)
67+
68+
Observe the "My Lend Positions" table that has been populated with the deposit.
69+
70+
![My Lend Position IBTC](../_assets/img/guide/lending-page-my-lend-ibtc.png)
71+
72+
73+
### 4. Enable the collateral toggle
74+
75+
!> **Attention:** Deposits that are enabled as collateral are subject to liquidation when the borrowed balance becomes undercollateralized.
76+
77+
In the "My Lend Positions" table, in the "Collateral" column, click on the toggle of the deposit you wish to enable as collateral. Doing so will allow you to take out an overcollateralized loan that is backed by this deposit.
78+
79+
![Enable Collateral Toggle](../_assets/img/guide/lending-page-enable-collateral.png)
80+
81+
If there are deposits in multiple asset types, it is easy to see which one is enabled as collateral and which one is not.
82+
83+
![IBTC enabled as collateral](../_assets/img/guide/lending-page-ibtc-collateral.png)
84+
85+
86+
### 5. Borrow
87+
88+
Select an asset from the "Borrow Markets" table and enter the amount you wish to borrow. Note that if the loan-to-value ratio increases too much, your collateral deposits could get liquidated.
89+
90+
The loan is now visible in the "My Borrow Positions" table.
91+
92+
![IBTC Loan](../_assets/img/guide/lending-page-ibtc-loan.png)
93+
94+
### 6. Repay a loan
95+
96+
When you are ready to repay a loan, click on an item in the "My Borrow Positions" and enter an amount. There is a graph that shows how your loan-to-value (LTV) ratio will improve as a result.
97+
98+
![IBTC Loan](../_assets/img/guide/lending-page-repay.png)
99+
100+
101+
### 7. Withdraw a deposit
102+
103+
Click on an item in the "My Lend Positions" and select the "Withdraw" tab. You can withdraw the full deposit by clicking on the blue amount next to the "Limit:" text, or do a partial withdraw by entering a custom amount. Depending on the interest rates, you should be able to withdraw more than the initially deposited amount.
104+
105+
![Withdraw Loan](../_assets/img/guide/lending-page-withdraw.png)

0 commit comments

Comments
 (0)