Overview
Price sources (NavData) provide USD-denominated pricing for all assets in the Multiliquid Program. Each asset can have 1-5 pricing sources, which are aggregated and validated during swap execution.NAV Data Types
The program supports four types of NAV pricing sources:U64FixedAddress
Read price from a fixed byte offset in an on-chain account.- Read account data at
nav_account_address - Read u64 at byte offset
nav_price_offset - Interpret value with
price_decimalsdecimal places
- Custom price oracle accounts
- RWA issuer-published NAV accounts
- Any account storing price as u64 at known offset
Hardcoded
Static price value for stable-value assets.- Return
hardcoded_pricedirectly - Interpret with
price_decimalsdecimal places
- Dollar-pegged stablecoins (USDC, USDT)
- Assets with contractually fixed prices
PythPush
Pyth Network oracle integration for market prices.- Verify the configured account is owned by the Pyth receiver program and deserialize its
PriceUpdateV2data - Verify the account’s feed id matches
feed_id - Require the update to be no older than
max_age_secs - Require confidence to be within
max_conf_bpsunless it is zero (which disables this check) - Normalize the Pyth price and exponent into the program’s 9-decimal NAV format
- Market-priced assets with Pyth feeds
- Real-time price updates
- Cross-chain price consistency
RedstonePush
Redstone PriceData account pricing.Price Aggregation
When multiple NAV sources are configured for an asset, the program performs price aggregation:Aggregation Process
Divergence Validation
Theprice_difference_bps setting controls maximum allowed price divergence:
- If
divergence_bps > price_difference_bps: Return 0 (block swaps) - If within threshold: Return average price
Decimal Normalization
All prices are normalized to 9 decimal places internally:
Normalization Formula:
Reading NAV Accounts in Swaps
When executing swaps, NAV source accounts must be passed as remaining accounts. This example assumes stablecoin-as-quote ordering and Treasury disabled:Hardcoded NAV sources don’t require external accounts.
U64FixedAddress, PythPush, and RedstonePush sources need their accounts passed. Fee-token NAV accounts are also required; duplicate accounts can be included once.Best Practices
Monitoring
- Track NAV source health and availability
- Alert on divergence events (swaps blocked)
- Monitor Pyth oracle staleness
- Verify issuer oracle updates regularly
Error Handling
Next: Architecture Overview
Explore the program’s modular design and account structure