⬅️ Contracts

CompositeOracle

A composite oracle

Author: Fei Protocol

Reads two oracles and returns their product

Mainnet implementations

Name Address
balUsdCompositeOracle 0xDe0407851AEC6F073A63D27C7D29805CCD59D3e0
chainlinkRaiUsdCompositeOracle 0x392b1d29eDab680c5CA778D3A32b8284859BFBB0
compositeOracle 0x8721f9EAba0B9081069970bCBce38763D3D4f28E
creamUsdCompositeOracle 0x2BDca027c7f57eD9AC1769Ba3a3D64600578bA49
tribeUsdCompositeOracle 0xD7B8207f8644ee5cc60095023a8fcb8BdCF54732

Core, ChainlinkOracleWrapper, CollateralizationOracle, BalancerPCVDepositWeightedPool, TribeReserveStabilizer

Events

ContractAdminRoleUpdate

event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param Type Notes
oldContractAdminRole bytes32 indexed
newContractAdminRole bytes32 indexed

CoreUpdate

event CoreUpdate(address,address)
Params
Param Type Notes
oldCore address indexed
newCore address indexed

Paused

event Paused(address)
Params
Param Type Notes
account address

Unpaused

event Unpaused(address)
Params
Param Type Notes
account address

Update

event Update(uint256)
Params
Param Type Notes
_peg uint256

Methods

CONTRACT_ADMIN_ROLE

function CONTRACT_ADMIN_ROLE() view returns(bytes32)

a role used with a subset of governor permissions for this contract only

Returns
Param Type Notes
bytes32

core

function core() view returns(address)

address of the Core contract referenced

Returns
Param Type Notes
address ICore implementation address

fei

function fei() view returns(address)

address of the Fei contract referenced by Core

Returns
Param Type Notes
address IFei implementation address

feiBalance

function feiBalance() view returns(uint256)

fei balance of contract

Returns
Param Type Notes
uint256 fei amount held

isContractAdmin

function isContractAdmin(address) view returns(bool)

returns whether a given address has the admin role for this contract

Params
Param Type Notes
_admin address
Returns
Param Type Notes
bool

isOutdated

function isOutdated() view returns(bool)

determine if read value is stale

Returns
Param Type Notes
bool true if read value is stale

oracleA

function oracleA() view returns(address)

the first referenced oracle

Returns
Param Type Notes
address

oracleB

function oracleB() view returns(address)

the second referenced oracle

Returns
Param Type Notes
address

pause

function pause() nonpayable

set pausable methods to paused

paused

function paused() view returns(bool)

Returns true if the contract is paused, and false otherwise.

Returns
Param Type Notes
bool

read

function read() view returns(tuple,bool)

read the oracle price

Returns
Param Type Notes
tuple oracle price
bool true if price is valid

setContractAdminRole

function setContractAdminRole(bytes32) nonpayable

sets a new admin role for this contract

Params
Param Type Notes
newContractAdminRole bytes32

setCore

function setCore(address) nonpayable

set new Core reference address

Params
Param Type Notes
newCore address the new core address

tribe

function tribe() view returns(address)

address of the Tribe contract referenced by Core

Returns
Param Type Notes
address IERC20 implementation address

tribeBalance

function tribeBalance() view returns(uint256)

tribe balance of contract

Returns
Param Type Notes
uint256 tribe amount held

unpause

function unpause() nonpayable

set pausable methods to unpaused

update

function update() nonpayable

updates the oracle price

⬅️ Contracts