Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 24 additions & 28 deletions docs/developers/supply_and_borrow_market/interest_rate_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ description: JustLend DAO interest-rate model reference — WhitePaperInterestRa

JustLend DAO's interest rate model aims to maximize the utilization of assets while effectively managing liquidity risks. Therefore, the parameter utilization rate U of each market is particularly important, as it reflects the true situation of the available assets in each market. As the utilization rate approaches 100%, assets become scarce, making borrowing impossible. Meanwhile, suppliers may be unable to withdraw their liquidity due to the lack of available assets. The formula of the utilization U is defined as:

$$
U = \frac{\mathrm{Total\ Borrows}}{\mathrm{Total\ Supply}}
$$
<div style="text-align: center; font-size: 20px;">
U = Total Borrows / Total Supply
</div>

To calibrate the interest rate model around an optimal utilization rate which reflects the real conditions, JustLend DAO provides variable interest rates for markets through two distinct interest models:

Expand All @@ -23,25 +23,24 @@ To calibrate the interest rate model around an optimal utilization rate which re
The Whitepaper Rate Model is straightforward, as the borrowing rate is directly proportional to the utilization. The interest rate is defined as below.

### **Borrow Rate:**
$$
\mathrm{borrowRate}(u) = a \times u + b
$$
<div style="text-align: center; font-size: 20px;">
borrow_rate(u) = a u + b
</div>

where the borrow utilization rate `u` is defined as:

$$
u = \frac{\mathrm{borrows}}{\mathrm{cash} + \mathrm{borrows} - \mathrm{reserves}}
$$
<div style="text-align: center; font-size: 20px;">
u = borrows / (cash + borrows − reserves)
</div>

* `borrows:` the total amount borrowed in the market, denominated in the underlying asset, excluding bad debts;
* `cash:` the total amount of the underlying asset held by the market at a specific time;
* `reserves:` the amount of the underlying asset held by the market that is not accessible to borrowers or suppliers, as it is reserved for purposes outlined in the protocol's tokenomics.

### **Supply Rate:**

$$
\mathrm{supplyRate}(u) = \mathrm{borrowRate}(u) \times u \times (1 - \mathrm{reserveFactor})
$$
<div style="text-align: center; font-size: 20px;">
supply_rate(u) = borrow_rate(u) u (1 − reserve_factor)
</div>

#### **Model Parameters**
* `a:` variable interest rate slope;
Expand All @@ -56,32 +55,29 @@ The interest rate is defined as below.
### **Borrow Rate:**

**if u < kink:**

$$
\mathrm{borrowRate}(u) = a_1 \times u + b
$$
<div style="text-align: center; font-size: 20px;">
supply_rate(u) = a_1 * u + b
</div>

**if u >= kink:**

$$
\mathrm{borrowRate}(u) = a_1 \times \mathrm{kink} + a_2 \times (u - \mathrm{kink}) + b
$$
<div style="text-align: center; font-size: 20px;">
supply_rate(u) = a_1 * kink + a_2 * (u - kink) + b
</div>

where the borrow utilization rate `u` is defined as:

$$
u = \frac{\mathrm{borrows}}{\mathrm{cash} + \mathrm{borrows} - \mathrm{reserves}}
$$
<div style="text-align: center; font-size: 20px;">
u = borrows / (cash + borrows − reserves)
</div>

* `borrows:` the total amount borrowed in the market, denominated in the underlying asset, excluding bad debts.
* `cash:` the total amount of the underlying asset held by the market at a specific time.
* `reserves:` the amount of the underlying asset held by the market that is not accessible to borrowers or suppliers, as it is reserved for purposes outlined in the protocol's tokenomics.

### **Supply Rate:**

$$
\mathrm{supplyRate}(u) = \mathrm{borrowRate}(u) \times u \times (1 - \mathrm{reserveFactor})
$$
<div style="text-align: center; font-size: 20px;">
supply_rate(u) = borrow_rate(u) u (1 − reserve_factor)
</div>

#### **Model Parameters**
* `a_1:` variable interest rate slope1;
Expand Down