Skip to content

PegOracleL2 ​

Git Source

Inherits:FluidOracleL2, PegOracle

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_,
    address sequencerUptimeFeed_
)
    PegOracle(infoName_, targetDecimals_, colTokenDecimals_, debtTokenDecimals_, erc4626Feed_)
    FluidOracleL2(sequencerUptimeFeed_);

getExchangeRateOperate ​

solidity
function getExchangeRateOperate() public view override(PegOracle, FluidOracleL2) returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate() public view override(PegOracle, FluidOracleL2) returns (uint256 exchangeRate_);

getExchangeRate ​

solidity
function getExchangeRate() public view override(PegOracle, FluidOracleL2) returns (uint256 exchangeRate_);