Skip to main content

Overview

Asset Configuration accounts store the NAV (Net Asset Value) pricing sources and settings for each token in the protocol. Every RWA and stablecoin must have an AssetConfig account before it can be used in trading pairs.

Account Structure

PDA Seeds: ["asset", mint_address]

Asset Type

Instructions

init_asset_config_account

Register a new token for use in the protocol.

Parameters

Required Accounts

Behavior

  • Creates AssetConfig PDA for the token mint
  • Creates the fee-vault ATA owned by program_authority for fee collection
  • Validates NAV data (1-5 sources, decimals ≤ 9) and price_difference_bps <= 9900
  • Sets paused to false by default
  • Sets used_in_pairs_count to 0

Access Control

Access: Admin only

Example


update_asset_config_account

Update NAV sources for an existing asset.

Parameters

Required Accounts

Behavior

  • Updates NAV sources and price divergence threshold after validating price_difference_bps <= 9900
  • Can update asset_type, but change is blocked if used_in_pairs_count > 0
  • Does not affect pause state or usage count

Access Control

Access: Admin only

Example


set_paused_for_asset

Set the pause state for a specific asset.

Parameters

Required Accounts

Behavior

  • Updates asset’s pause state
  • When paused, all swaps involving this asset are blocked
  • Does not affect other assets or global state

Access Control

Access: Admin only

Example


The program supports three types of NAV pricing sources:

U64FixedAddress

Read price from a fixed byte offset in an on-chain account.
Use Cases:
  • Custom price oracle accounts
  • RWA issuer-published NAV accounts
  • Any account with a u64 price at known offset

Hardcoded

Static price value for stable-value assets.
Use Cases:
  • Dollar-pegged stablecoins (price = 1.0)
  • Assets with contractually fixed prices
  • Testing and development

PythPush

Pyth Network oracle integration.
Use Cases:
  • Market-priced assets
  • Assets with Pyth price feeds
  • High-frequency price updates

View Price Source Details

Complete documentation on NAV pricing configuration and validation

Price Aggregation

When multiple NAV sources are configured:
  1. Read All Sources: Each source returns a price
  2. Normalize: All prices converted to 9 decimal places
  3. Validate Divergence: Check all prices within price_difference_bps
  4. Average: Return average of all valid prices
If any source diverges beyond threshold, the function returns 0, blocking swaps.

Error Codes


Next: Pair Management

Learn about trading pair creation and configuration