Skip to content

WstETHOracle

The repository contains two incompatible wstETH oracle families. Current Ethereum deployment artifacts use WstETHOracleV2; the older WstETHOracle API is retained below only for exact legacy deployments.

The WstETHOracleV2 v2.16.0 source inherits the capped base:

constructor(
address stETH,
address wstETH,
address underlyingToken,
address resilientOracle,
uint256 annualGrowthRate,
uint256 snapshotInterval,
uint256 initialSnapshotMaxExchangeRate,
uint256 initialSnapshotTimestamp,
address accessControlManager,
uint256 snapshotGap
)

It obtains stETH per wstETH from getPooledEthByShares(1e18) and assumes the configured underlying token is equivalent to stETH for that conversion.

STETH() exposes the immutable stETH contract used for that conversion.

RouteAddressUnderlying routeState at block 25845949
equivalence0x6b51Ee3aF70b350AaADc05f418502b330c5Aad7cWETHinterval 2,592,000, growth/second 2,124,556,062, gap 6,637,568,880,406,786, not capped
non-equivalence0x6ecf38558B0D1fFc6Ea28bEC6BD39F9F0Fdd6631stETHsame cap parameters, not capped

WstETHOracle.sol is a separate, uncapped five-argument implementation:

constructor(
address wstETH,
address weth,
address stETH,
address resilientOracle,
bool assumeStETHETHEquivalence
)

Do not infer that V1 is active from the continued source file, and do not decode the V2 addresses with the V1 boolean constructor. Identify any legacy consumer by its exact deployed bytecode before retaining or retiring it.