sXDAI
Custom price feed for Savings xDAI (sDAI) on Gnosis Chain.
Last updated
Custom price feed for Savings xDAI (sDAI) on Gnosis Chain.
Custom price feed for Savings xDAI (sDAI) on Gnosis Chain. sXDAI is an ERC-4626 vault share that accrues yield from the Gnosis Chain savings rate. The price is derived from the vault's current share-to-xDAI conversion rate multiplied by the xDAI/USD price read from the NAV's own primary feed.
Source: sXDAI_CustomPriceFeed.sol
The xDAI/USD term is sourced from the NAV's own selector — see Base/USD from the NAV's own selector.
sDAI.convertToAssets(1 sDAI) × xDAI/USD (from the NAV's primary feed via getPriceDataNoDivergence(xDAI))
convertToAssets()
IERC4626(sDAI)
xDAI backing per 1 sDAI at the current savings rate
xDAI_USD
NAV base — getPriceDataNoDivergence(xDAI) (8 dec)
the NAV's primary xDAI/USD price
xDAI on Gnosis Chain is the native gas token, pegged to DAI. The Gnosis savings rate accumulates directly in the sDAI vault, so convertToAssets reflects real-time interest accrual. Vault decimals are read once at deploy. Result carries the feed's 8 decimals.
sDai_
The Savings xDAI vault address (also used to read vault decimals)
nav_
NAVCalculator (proxy) — supplies the base stablecoin's USD price via getPriceDataNoDivergence
baseAsset_
The registered base stablecoin whose USD price is read (xDAI); must equal the vault's asset() — reverts BaseAssetMismatch otherwise
The price is stale if the base USD price is ≤ 0, or if the NAV reports the base asset (xDAI) stale — all its feeds stale. The base leg's updatedAt comes from the NAV's selected xDAI feed. The convertToAssets rate has no heartbeat — it is a live view on the ERC-4626 vault.
Deployed on Gnosis only. There is no Ethereum counterpart in this system: mainnet registers DAI but not sDAI, so no sDAI feed is configured there.
Last updated
decimals = sDAI.decimals() // vault share decimals
rate = sDAI.convertToAssets(10^decimals) // xDAI per 1 sDAI (vault decimals)
price = xDAI_USD × rate / 10^decimalsconstructor(
address sDai_,
address nav_,
address baseAsset_
)