# Oracles

### afiUSD Oracle -&#x20;

The **afiUSD Oracle** exposes a **Chainlink-compatible afiUSD / USD price feed**.

It derives price from:

* afiUSD vault exchange rate (`IafiUSD.exchangeRate()` – 6 decimals)
* Chainlink USDC / USD feed

The oracle implements standard Chainlink interfaces, enabling **drop-in use wherever a Chainlink feed is expected**.

#### Interface

* `decimals()` → 8
* `latestAnswer()` → afiUSD / USD price
* `latestRoundData()` → Chainlink-style round data

#### Helpers

* `getUSDCPrice()` → USDC / USD from Chainlink
* `getCurrentExchangeRate()` → afiUSD vault exchange rate

#### Usage

```solidity
int256 price = afiOracle.latestAnswer(); // afiUSD / USD (8 decimals)
```

#### Deployment

* **Ethereum Mainnet**: [`0x32f232423829296F035E2cfcdC426911D4A1a582`](https://etherscan.io/address/0x32f232423829296f035e2cfcdc426911d4a1a582)

***

### afi-rwaUSDi Oracle -&#x20;

Stores the **afi-rwaUSDi ↔ underlying asset exchange rate**, used by the vault for share-to-asset conversions.

#### Properties

* **Precision**: 6 decimals (1e6)

#### Functions

* `fetchExchangeRate()` → read current rate
* `updateExchangeRate()` → update rate (authorized updaters)

#### Deployment

* **Ethereum Mainnet**: [`0x7Ddb808B451890cD6BDdCB06B3C80Bf355a644AE`](https://etherscan.io/address/0x7ddb808b451890cd6bddcb06b3c80bf355a644ae)
* **Base**: [`0x6a34dF39c0d66332F957ECacF84Da1FAf30165F3`](https://basescan.org/address/0x6a34df39c0d66332f957ecacf84da1faf30165f3)


---

# 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.afiprotocol.xyz/resources/oracles.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.
