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
["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_authorityfor fee collection - Validates NAV data (1-5 sources, decimals ≤ 9) and
price_difference_bps <= 9900 - Sets
pausedtofalseby default - Sets
used_in_pairs_countto 0
Access Control
Access: Admin onlyExample
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 ifused_in_pairs_count > 0 - Does not affect pause state or usage count
Access Control
Access: Admin onlyExample
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 onlyExample
NAV Data Types
The program supports three types of NAV pricing sources:U64FixedAddress
Read price from a fixed byte offset in an on-chain account.- 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.- Dollar-pegged stablecoins (price = 1.0)
- Assets with contractually fixed prices
- Testing and development
PythPush
Pyth Network oracle integration.- 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:- Read All Sources: Each source returns a price
- Normalize: All prices converted to 9 decimal places
- Validate Divergence: Check all prices within
price_difference_bps - Average: Return average of all valid prices
Error Codes
Next: Pair Management
Learn about trading pair creation and configuration