NXM / wNXM
Custom price feed for Nexus Mutual's NXM token and its 1:1 transferable wrapper wNXM on Ethereum.
Last updated
Custom price feed for Nexus Mutual's NXM token and its 1:1 transferable wrapper wNXM on Ethereum.
Custom price feed for Nexus Mutual's NXM token and its 1:1 transferable wrapper wNXM on Ethereum. NXM has no external market oracle by design; its value is set internally by Nexus Mutual's Ratcheting AMM (RAMM), combined here with an ETH/USD price read from the NAV's own primary feed.
The ETH/USD term is sourced from the NAV's own selector — see Base/USD from the NAV's own selector.
Source: NXM_CustomPriceFeed.sol
RAMM.getInternalPrice() (ETH per NXM, TWAP) × NAV-selected ETH/USD.
Deploy one instance per priced token: one for NXM and one for wNXM. Both use the same RAMM book value per NXM-unit, since a member can unwrap wNXM 1:1 to NXM.
getInternalPrice()
IRamm(RAMM)
Manipulation-resistant TWAP of ETH per NXM (18 dec)
ETH_USD
NAV base — getPriceDataNoDivergence(WETH) (8 dec)
the NAV's primary WETH/USD price
getInternalPrice() is the RAMM's internal ETH-per-NXM price (18 dec); multiplying by the 8-dec ETH/USD and dividing by 1e18 yields an 8-decimal USD price. If the internal price is zero, the feed returns stale.
token_
The priced token: NXM or its 1:1 wrapper wNXM
ramm_
Nexus Mutual RAMM contract providing the internal ETH-per-NXM price
nav_
NAVCalculator (proxy) — supplies the base asset's USD price via getPriceDataNoDivergence
baseAsset_
The registered base asset whose USD price is read (WETH)
The constructor reverts if RAMM.getInternalPrice() returns 0 at deploy, failing fast on a wrong or non-contract RAMM address.
The price is stale if getInternalPrice() returns 0, or if the NAV reports the base asset (WETH) stale — all its feeds stale. The base leg's updatedAt comes from the NAV's selected WETH feed. The RAMM internal price itself has no heartbeat — it is a view function read live on each call.
Deployed on Ethereum mainnet. One instance is deployed per priced token (NXM and wNXM).
Last updated
price = getInternalPrice × ETH_USD / 1e18constructor(
address token_,
address ramm_,
address nav_,
address baseAsset_
)