ChainlinkETHUSDPriceConsumercontract is responsible for getting the price of ETH in terms of USD. To get the price of ETH in USD from this contract, call
getLatestPrice()and divide by
1 hourtime-weighted average price on its Uniswap pools to get price information for FRAX, FXS, and the collateral tokens in the system. The period of the time-weighted average price is changeable as a system parameter through a governance proposal.
UniswapPairOraclecontract allows one to get the price of a token within the system from its pool balance. To get the price of a token from a pair, call
consult(address token, uint amountIn)on the pair's UniswapPairOracle instance with the token's address and requested quantity.