Spectra Developer Docs
  • Developers Documentation
  • Getting Started
  • Guides
    • Tokenizing Yield
    • Providing Liquidity
    • Deploy PT and Curve Pool
    • Routing
    • IBT Additional Rewards
    • Locking APW for veAPW
    • Voting and Earning Rewards
  • Technical Reference
    • Deployed Contracts
    • Contract Functions
      • Principal Token
      • Yield Token
      • Registry
      • RateOracle
      • Factory
      • Access Manager
      • RouterUtil
      • Router
      • GovernanceRegistry
      • Voter
      • VotingReward
        • BribeVotingReward
        • FeesVotingReward
      • FeeDistributor
      • Spectra4626Wrapper
    • Yield Calculations
    • Spectra's Automated Market Makers
      • Rate Adjusted StableSwap pools
  • Glossary
  • INTEGRATION REFERENCE
    • Spectra Oracles
      • TWAP Oracles
      • Deterministic Oracles
        • Linear APR model
        • Linear Discount Model
        • Zero Coupon Bond Model
        • Comparison
      • Oracle Deployment
        • Deterministic Oracles Deployment
        • TWAP Oracles Deployment
Powered by GitBook
On this page
  • Methods
  • pokeRate
  • View Methods
  • getRateOfVaultOnDate
  • getLastPokedDateOfVault
  1. Technical Reference
  2. Contract Functions

RateOracle

PreviousRegistryNextFactory

Last updated 1 year ago

The Rate Oracle is used to track the rate of the contract and stores the rate once a day.

RateOracle.sol code can be .

Methods

pokeRate

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

Return Parameter
Type
Description

uint256

The current rate that was set

View Methods

getRateOfVaultOnDate

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

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

getLastPokedDateOfVault

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

The address of the

Returns the last date that was executed for vault.

pokeRate()
PrincipalToken
found on GitHub
IBT