> For the complete documentation index, see [llms.txt](https://docs.notional.finance/governance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.notional.finance/governance/fcash-valuation/interest-rate-oracles.md).

# Interest Rate Oracles

Notional V2 liquidity pools track two different interest rates, the **last traded rate** and the **oracle rate**.&#x20;

### Last traded rate

The last traded rate reflects the implied interest rate of the last trade executed on the liquidity pool. The last traded rate could be manipulated over short time frames (such as via flash loans) to display a rate that does not reflect the true, or equilibrium interest rate of the liquidity pool at a particular time.&#x20;

These limitations make the last traded rate insecure as a price oracle by which to value fCash. Given that we allow users to borrow against their fCash, we need to ensure that the price oracle used to value fCash can't be manipulated. If the price oracle can be manipulated, an attacker could artificially move interest rates to a level that would push accounts into a state of under-collateralization. The attacker could then liquidate these accounts at an artificial price.

### Oracle rate

The oracle rate is designed to mitigate the risk of price manipulation by providing a lagged, dampened price feed that converges to the last traded rate over a time window set by governance. The oracle rate is defined like this:

```
oracleRate =
  lastTradedRate *
    min((currentBlockTime - lastTradedTime) / timeWindow, 1) +
  previousOracleRate *
    max(timeWindow - (currentBlockTime - lastTradedTime) / timeWindow, 0)
```

This design ensures that the oracle rate will not be vulnerable to flash loan attacks -  trades within a single block will have a `currentBlockTime - lastTradedTime` value of `0` which means they will have no effect on the oracle rate. Here is an example that illustrates how the oracle rate will respond to trades and converge to the last traded rate over time:

<figure><img src="/files/BfzG6EGABwON5j3ULKWO" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.notional.finance/governance/fcash-valuation/interest-rate-oracles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
