# Index Calculation

### Index Components&#x20;

The cornerstone of the IPOR Protocol is the index rates which is sourced from established and robust DeFi credit markets. Conditions for selection of the money markets for the index are outlined in the [Manifesto](broken://pages/2mjvLbIWdfVoR4FGgupA), but in a nutshell, the rates used to compile the index come from credit markets that:&#x20;

* are decentralized - work as on-chain smart contracts
* are established - they have aggregated users and liquidity over time
* have proven security track record

The IPOR Oracle service sources the interest rates for every block for any given currency from appointed markets and compiles the IPOR Index rate.&#x20;

### Index Formula&#x20;

The IPOR Index rate is essentially the market cost of money defined by a weighted average of rates sources at all money markets included in IPOR:&#x20;

$$
IPOR(Borrow) = \frac{\sum\_{i \in I} w^b\_i \cdot r\_i}{W\_{borrow}}\\

IPOR(Supply) = \frac{\sum\_{i \in I} w^s\_i \cdot r\_i}{W\_{supply}}
$$

$$
IPOR = \frac{IPOR(Borrow) + IPOR(Supply)}{2}
$$

IPOR Borrow is the weighted average of the rate to borrow.&#x20;

IPOR Supply is the weighted average of the rate to lend.

Weight is the total amount borrowed or supplied on a given market. &#x20;

Finally, IPOR is the simple average between those two.

### **Standarizing the rate**

It is important to note, that the rate that money markets such as AAVE and Compound quote is not always the actual rate, but rather an APY that accocunts for compounding. In order to be able to compare apples for apples the rate is "deflated" to the actuall rate and then compounding is done via the [IBT](/ipor-derivatives/interest-rate-derivatives/ibt.md#continuous-compounding)

### Updating the Index&#x20;

The IPOR is meant to evolve to become the representation of the fair market cost of money. Given the speed of innovation in DeFi and the free flow nature of capital across protocols and chains, it is expected that new platforms will be added, and some platforms will be removed over time. The index methodology may need to be changed or updated, and decisions must be made about how to transition from one construction to another. The IPOR DAO will govern decisions like these.

#### Listing&#x20;

When adding a new market to the index, the new rate mustn't cause a sudden jump in the rate. To smooth the process of onboarding new platforms, IPOR oracle will be increasing their weight block over block in a span of the DAO-appointed phase-in period linearly from 0% to 100% of its standard weight as determined by the liquidity in a given protocol.&#x20;

#### Delisting&#x20;

Delisting of the protocol can happen in 2 ways:&#x20;

* Standard delisting - the process is generally the reverse of listing a new protocol. Weight is reduced from 100% to 0% over the appointed phase-out time.
* Emergency delisting  - should there be a justified reason to remove the protocol listed as a part of IPOR  in an emergency mode (ex. due to hack, fraud, etc.) admin of the oracle may invoke an emergency delisting with immediate consequences.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ipor.io/ipor-derivatives/interest-rate-derivatives/index-calculation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
