Essence Finance
    • Introduction
  • Protocol
    • Peg Stabilty
    • Collateralization
    • Decentralization
  • TOKENOMICS
    • ZEN
    • Distribution
    • Stake
  • Protocol Controlled Value
    • Protocol Controlled Value (PCV)
    • PCV Management
    • PCV Deposits
  • Governance
    • Essence DAO
    • Governance Phases
    • Access Control
    • Roles
  • Smart Contracts
    • Contract Addresses
    • Audits
  • Development
    • Smart Contracts API
      • Chi
        • IChi
      • Minter
        • IPCVEquityMinter
        • PCVEquityMinter
        • RateLimitedMinter
      • Core
        • Core
        • ICore
        • IPermissions
        • IPermissionsRead
        • Permissions
        • ZenRoles
      • Dao
        • Governor
          • EssenceDAO
        • Timelock
          • EssenceDAOTimelock
          • OptimisticTimelock
          • Timelock
      • External
        • Decimal
        • WETH9
      • Libs
        • CoreRefPauseableLib
        • UintArrayOps
      • Oracle
        • ChainlinkOracleWrapper
        • CompositeOracle
        • ConstantOracle
        • ICollateralizationOracle
        • ICollateralizationOracleWrapper
      • Pcv
        • IPCVDeposit
        • IPCVDepositBalances
        • IPCVGuardian
        • IPCVSwapper
        • PCVDeposit
        • PCVGuardian
      • Peg
        • FixedPricePSM
        • IPegStabilityModule
        • IPriceBound
        • IPSMRouter
        • PegStabilityModule
        • PriceBoundPSM
        • PSMRouter
      • Refs
        • CoreRef
        • ICoreRef
        • IOracleRef
        • IUniRef
        • OracleRef
        • UniRef
      • Timelocks
        • ITimelockedDelegator
        • ITokenTimelock
        • LinearTimelockedDelegator
        • LinearTokenTimelock
        • QuadraticTimelockedDelegator
        • QuadraticTimelockedSubdelegator
        • QuadraticTokenTimelock
        • TimelockedDelegator
        • TokenTimelock
      • Utils
        • RateLimited
      • Zen
        • IZenMinter
        • Zen
        • ZenMinter
Powered by GitBook
On this page
  • Functions
  • constructor
  • update
  • isOutdated
  • read
  1. Development
  2. Smart Contracts API
  3. Oracle

CompositeOracle

Reads two oracles and returns their product

Functions

constructor

function constructor(
    address _core,
    contract IOracle _oracleA,
    contract IOracle _oracleB
) public

CompositeOracle constructor

Parameters

Name
Type
Description

_core

address

_oracleA

contract IOracle

first referenced oracle

_oracleB

contract IOracle

second referenced oracle

update

function update() external

updates the oracle price

isOutdated

function isOutdated() external returns (bool)

determine if read value is stale

Return Values

Name
Type
Description

[0]

bool

true if read value is stale

read

function read() external returns (struct Decimal.D256, bool)

read the oracle price

Return Values

Name
Type
Description

[0]

struct Decimal.D256

oracle price

[1]

bool

true if price is valid

PreviousChainlinkOracleWrapperNextConstantOracle

Last updated 1 year ago