# Interest Rate Model

### OT Interest model is 2-slop based mechanism

* ~~Minting and borrowing OSD using select collateral comes with a 0.5% fee based on borrowing amount. Fee is paid up when CDP is partially or fully closed.~~
* Interest rate of minting and borrowing OSD using select collaterals is quoted from oracles or third party lending/borrowing market such as AAVE or Compound.
* Interest rate of borrowing non-OSD assets will be based on a 2 part slope formula as following:

> The interest rate$$R\_t$$follows the model:
>
> $$if \hspace{1mm} U < U\_{optimal}:  \hspace{1cm}  R\_t = R\_0 + \frac{U\_t}{U\_{optimal}} R\_{slope1}$$  &#x20;
>
> $$if \hspace{1mm} U \geq  U\_{optimal}:  \hspace{1cm} R\_t = R\_0 + R\_{slope1} + \frac{U\_t-U\_{optimal}}{1-U\_{optimal}}R\_{slope2}$$

```javascript
const otBorrowRate = function (r0, u, uOptimal, slop1, slop2) {
  let rate;
  if (u < uOptimal) {
    rate = r0 + (u / uOptimal) * slop1;
  } else {
    rate = r0 + slop1 + ((u - uOptimal) / (1 - uOptimal)) * slop2;
  }
  return rate;
};

const main = function () {
  const assetConfigArray = [
    [[0.8, 0, 0.04, 1], 0.02, "USDC"],
    [[0.8, 0, 0.04, 1], 0.85, "USDC"],
    [[0.65, 0, 0.08, 1], 0.02, "ETH"],
    [[0.65, 0, 0.08, 1], 0.7, "ETH"],
  ];
  for (const assetConfig of assetConfigArray) {
    const [config, u, asset] = assetConfig;
    const [uOptimal, r0, slop1, slop2] = config;
    console.log(
      asset,
      `on Utilization Rate = ${u} Interest Rate is ${otBorrowRate(r0, u, uOptimal, slop1, slop2)}`
    );
  }
};

main();
```

<figure><img src="https://3227338076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn262PLtizMqtNJu9DRnQ%2Fuploads%2FSCAIb1KTsPW6XDOq8BWg%2Fimage.png?alt=media&#x26;token=663415ad-5467-405c-a305-fbe00faed0b8" alt=""><figcaption></figcaption></figure>

### Variable Interest Rate Model Parameters

<table data-header-hidden><thead><tr><th width="150">Asset</th><th width="150" align="center"> </th><th width="150" align="center">Base</th><th width="150" align="center">Slope 1</th><th align="center">Slope 2</th></tr></thead><tbody><tr><td>Asset</td><td align="center"> <span class="math">U_{optimal} </span></td><td align="center">Base</td><td align="center">Slope 1</td><td align="center">Slope 2</td></tr><tr><td>BUSD</td><td align="center">80%</td><td align="center">0%</td><td align="center">4%</td><td align="center">100%</td></tr><tr><td>USDC</td><td align="center">90%</td><td align="center">0%</td><td align="center">4%</td><td align="center">60%</td></tr><tr><td>DAI</td><td align="center">80%</td><td align="center">0%</td><td align="center">4%</td><td align="center">75%</td></tr><tr><td>USDT</td><td align="center">90%</td><td align="center">0%</td><td align="center">4%</td><td align="center">60%</td></tr><tr><td>OSD</td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td></tr><tr><td>ETH</td><td align="center">65%</td><td align="center">0%</td><td align="center">8%</td><td align="center">100%</td></tr><tr><td>WBTC</td><td align="center">65%</td><td align="center">0%</td><td align="center">7%</td><td align="center">100%</td></tr><tr><td>LINK</td><td align="center">45%</td><td align="center">0%</td><td align="center">7%</td><td align="center">300%</td></tr></tbody></table>

### Stable Interest Rate Model Parameters

The stable rate provides predictability for the borrower which comes at a cost, as the interest rates are higher than the variable rate. However the rate of a stable loan is fixed until the rebalancing conditions are met:

1. Utilisation Rate: $$U\_t > 95%$$&#x20;
2. Overall Borrow Rate, the weighed average of all the borrow rates: $$R\_O < 25%$$&#x20;

The currencies the most exposed to liquidity risk do not offer stable rate borrowing.

The base rate of the stable rate model corresponds to the average market rate of the asset.

<table data-header-hidden><thead><tr><th width="150">Asset</th><th width="150" align="center"> </th><th width="150" align="center">Base</th><th width="150" align="center">Slope 1</th><th align="center">Slope 2</th></tr></thead><tbody><tr><td>Asset</td><td align="center"> <span class="math">U_{optimal} </span></td><td align="center">Base</td><td align="center">Slope 1</td><td align="center">Slope 2</td></tr><tr><td>BUSD</td><td align="center">80%</td><td align="center">4%</td><td align="center">2%</td><td align="center">60%</td></tr><tr><td>DAI</td><td align="center">80%</td><td align="center">4%</td><td align="center">2%</td><td align="center">75%</td></tr><tr><td>USDC</td><td align="center">90%</td><td align="center">4%</td><td align="center">2%</td><td align="center">60%</td></tr><tr><td>USDT</td><td align="center">90%</td><td align="center">3.5%</td><td align="center">2%</td><td align="center">60%</td></tr><tr><td>OSD</td><td align="center"></td><td align="center">4%</td><td align="center"></td><td align="center"></td></tr><tr><td>ETH</td><td align="center">65%</td><td align="center">3%</td><td align="center">10%</td><td align="center">100%</td></tr><tr><td>WBTC</td><td align="center">65%</td><td align="center">3%</td><td align="center">10%</td><td align="center">60%</td></tr><tr><td>LINK</td><td align="center">45%</td><td align="center">3%</td><td align="center">10%</td><td align="center">300%</td></tr></tbody></table>

## Interest Rate Parameters Change

When market conditions change, risks change. The utilization of reserves is continuously monitored to check liquidity is available. In case of prolonged full utilization, the interest rate parameters are adapted to mitigate any risks emerging from market conditions
