Skip to content

SUSDeOracleImpl ​

Git Source

Inherits: OracleError

This contract is used to get the exchange rate between sUSDe and USDe, adjusted for token decimals of a debt token (e.g. USDC / USDT)

State Variables ​

_SUSDE_PRICE_SCALER_MULTIPLIER ​

constant value for price scaling to reduce gas usage

solidity
uint256 internal immutable _SUSDE_PRICE_SCALER_MULTIPLIER;

_SUSDE ​

SUSDE contract, e.g. on mainnet 0x9d39a5de30e57443bff2a8307a4256c8797a3497

solidity
IERC4626 internal immutable _SUSDE;

_DEBT_TOKEN_DECIMALS ​

solidity
uint8 internal immutable _DEBT_TOKEN_DECIMALS;

Functions ​

constructor ​

constructor sets the sUSDe sUSDe_ token address.

solidity
constructor(IERC4626 sUSDe_, uint8 debtTokenDecimals_);

_getSUSDeExchangeRate ​

Get the exchange rate from sUSDe contract (amount of USDe for 1 sUSDe)

solidity
function _getSUSDeExchangeRate() internal view returns (uint256 rate_);

Returns

NameTypeDescription
rate_uint256The exchange rate in OracleUtils.RATE_OUTPUT_DECIMALS

sUSDeOracleData ​

returns all sUSDe oracle related data as utility for easy off-chain use / block explorer in a single view method

solidity
function sUSDeOracleData()
    public
    view
    returns (uint256 sUSDeExchangeRate_, IERC4626 sUSDe_, uint256 debtTokenDecimals_);