Nucleus
  • Overview
    • Welcome to Nucleus
    • Official Links
    • FAQ
  • Nucleus Architecture
    • Overview
    • Vault Framework
    • Cross-chain Infrastructure
    • Withdrawals
    • Revenue Strategies
      • Market-agnostic Lending
      • Cross-chain Intents
      • Ownership by Default
    • Reward Distribution
    • Nucleus Points
    • Deployed Assets
    • Smart Contracts
      • README
      • CONTRACTS
        • contents
        • atomic-queue
          • Contents
          • AtomicQueue
          • AtomicSolver
          • AtomicSolverV2
          • AtomicSolverV3
          • IAtomicSolver
        • base
          • Boring Vault
            • BoringVault
          • Decoders and Sanitizers
            • Contents
            • IonPoolDecoderAndSanitizer
          • Roles
            • Contents
            • Cross Chain
              • Cross Chain OP Teller With Multi Asset Support
                • CrossChainOPTellerWithMultiAssetSupport
                • ICrossDomainMessenger
              • Cross Chain Teller Base
                • BridgeData
                • CrossChainTellerBase
              • MultiChainLayerZeroTellerWithMultiAssetSupport
              • Multi Chain Teller Base
                • Chain
                • MultiChainTellerBase
                • MultiChainTellerBase_GasLimitExceeded
                • MultiChainTellerBase_GasTooLow
                • MultiChainTellerBase_MessagesNotAllowedFrom
                • MultiChainTellerBase_MessagesNotAllowedFromSender
                • MultiChainTellerBase_MessagesNotAllowedTo
                • MultiChainTellerBase_ZeroMessageGasLimit
              • OAppAuth
                • Contents
                • OAppAuth
                • OAppAuthCore
                • OAppAuthReceiver
                • OAppAuthSender
            • AccountantWithRateProviders
            • ManagerWithMerkleVerification
            • TellerWithMultiAssetSupport
        • helper
          • Contents
          • Constants
          • ArcticArchitectureLens
          • Deployer
          • GenericRateProvider
        • interfaces
          • BalancerVault
          • AggregationRouterV5
          • BeforeTransferHook
          • DecoderCustomTypes
          • ICreateX
          • IPriceFeed
          • PriceRouter
          • IRateProvider
          • INonFungiblePositionManager
          • Contents
          • IStaking
            • ILiquidityPool
            • ILRTDepositPool
            • IRestakeManager
            • IStaderConfig
            • IStakePoolManager
            • ISTETH
            • ISWETH
            • IUNSTETH
            • IUserWithdrawManager
            • IWEETH
            • IWithdrawRequestNft
            • IWSTETH
          • IUniswap v3 Router
            • IUniswapV3Router
            • IUniswapV3SwapCallback
        • micro-managers
          • Contents
          • DexSwapperUManager
          • DexAggregatorUManager
          • UManager
        • migration
          • Contents
          • CellarMigrationAdaptor
        • oracles
          • EthPerTokenRateProvider
          • Contents
          • EthPerWstEthRateProvider
  • Security
    • Audits
Powered by GitBook
On this page
  • State Variables
  • ST_ETH_TO_ETH_CHAINLINK
  • WST_ETH
  • MAX_TIME_FROM_LAST_UPDATE
  • Functions
  • constructor
  • getRate
  • Errors
  • MaxTimeFromLastUpdatePassed

Was this helpful?

  1. Nucleus Architecture
  2. Smart Contracts
  3. CONTRACTS
  4. oracles

EthPerWstEthRateProvider

PreviousContentsNextAudits

Was this helpful?

Inherits: IRateProvider

Reports the price of wstETH in terms of ETH.

State Variables

ST_ETH_TO_ETH_CHAINLINK

IChainlink public immutable ST_ETH_TO_ETH_CHAINLINK;

WST_ETH

IWstEth public immutable WST_ETH;

MAX_TIME_FROM_LAST_UPDATE

uint256 public immutable MAX_TIME_FROM_LAST_UPDATE;

Functions

constructor

constructor(address _stEthToEthChainlink, address _wstETH, uint256 _maxTimeFromLastUpdate);

Parameters

Name
Type
Description

_stEthToEthChainlink

address

The chainlink price feed for stETH/ETH.

_wstETH

address

The wstETH contract address.

_maxTimeFromLastUpdate

uint256

getRate

Gets the price of wstETH in terms of ETH.

If the beaconchain reserve decreases, the wstETH to stEth conversion will be directly impacted, but the stEth to Eth conversion will simply be determined by the chainlink price oracle.

function getRate() public view returns (uint256 ethPerWstEth);

Returns

Name
Type
Description

ethPerWstEth

uint256

price of wstETH in ETH. [WAD]

Errors

MaxTimeFromLastUpdatePassed

error MaxTimeFromLastUpdatePassed(uint256 blockTimestamp, uint256 lastUpdated);
Git Source