Skip to content

PegOracle ​

Git Source

Inherits:FluidOracle, PegOracleImpl

This contract is used to get the exchange rate between pegged assets like sUSDE / USDC or USDE / USDC. Price is adjusted for token decimals and optionally a IERC4626 source feed can be set (e.g. for sUSDE or sUSDS).

Functions ​

constructor ​

solidity
constructor(
    string memory infoName_,
    uint8 targetDecimals_,
    uint8 colTokenDecimals_,
    uint8 debtTokenDecimals_,
    IERC4626 erc4626Feed_
) PegOracleImpl(colTokenDecimals_, debtTokenDecimals_, erc4626Feed_) FluidOracle(infoName_, targetDecimals_);

getExchangeRateOperate ​

solidity
function getExchangeRateOperate() public view virtual override returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate() public view virtual override returns (uint256 exchangeRate_);

getExchangeRate ​

solidity
function getExchangeRate() public view virtual override returns (uint256 exchangeRate_);