# RateOracle



The Rate Oracle is used to track the rate of the [IBT](/docs/glossary#ibt) contract and stores the rate once a day.

This page documents the legacy Core V2 RateOracle interface.

## Methods [#methods]

### pokeRate [#pokerate]

```solidity
function pokeRate(IERC4626Upgradeable vault) external returns (uint256)
```

Stores the current rate of the underlying asset of `vault`.

Note: Rates are stored once a day. If this method is called when the rate has already been stored, then the current rate for that day will be returned, saving gas.

| Input Parameter | Type    | Description                       |
| --------------- | ------- | --------------------------------- |
| `vault`         | address | The address of the PrincipalToken |

| Return Parameter | Type    | Description                   |
| ---------------- | ------- | ----------------------------- |
|                  | uint256 | The current rate that was set |

## View Methods [#view-methods]

### getRateOfVaultOnDate [#getrateofvaultondate]

```solidity
function getRateOfVaultOnDate(address vault, uint256 date) public view returns (uint256)
```

Returns the rate of the underlying asset of `vault` at `date`.

### getLastPokedDateOfVault [#getlastpokeddateofvault]

```solidity
function getLastPokedDateOfVault(address vault) public view returns (uint256)
```

Returns the last date that [`pokeRate()`](/docs/technical-reference/contract-functions/rateoracle#pokerate) was executed for `vault`.
