Oracle & ShareManager
NAV Oracle
The NAVOracle tracks the total value of assets in the vault. It normalizes all values to 18 decimals internally, regardless of the underlying asset's decimals. The contract enforces percentage-based limits on NAV changes to prevent large swings and potential manipulation.
getNAV()
Get the current Net Asset Value.
/**
* @return Current NAV in 18 decimals
*/
function getNAV() external view returns (uint256);Share Manager
The ShareManager maintains the total supply of vault shares and provides controlled mechanisms for minting and burning them. There is only one ShareManager per xToken and it exists only on the hub chain (HyperEVM).
maxSupply()
Get the maximum total supply of shares across all users.
/**
* @return Maximum total supply of shares (18 decimals)
* @dev Enforced in DepositPipe when minting shares
* @dev Controls overall vault growth and prevents unlimited expansion
*/
function maxSupply() external view returns (uint256);maxWithdraw()
Get the maximum shares that can be redeemed per user per transaction.
/**
* @return Maximum shares per redemption transaction (18 decimals)
* @dev Enforced in RedemptionPipe for instant and pending redemptions
* @dev Limits redemption size to prevent large withdrawals
*/
function maxWithdraw() external view returns (uint256);maxDeposit()
Get the maximum shares that can be deposited per user per transaction.
/**
* @return Maximum shares per deposit transaction (18 decimals)
* @dev Enforced in DepositPipe for deposit and mint
*/
function maxDeposit() external view returns (uint256);totalSupply()
Get the current total supply of shares (include shares on spoke chains).
/**
* @return Current total supply of shares (18 decimals)
* @dev Standard ERC20 function
* @dev Represents total shares minted across all users
*/
function totalSupply() external view returns (uint256);Price per share
The price per share of a xToken can be determined using the following formula:
Share Price = Total NAV / Total Share Supply
Share Price = NAVOracle.getNAV() / ShareManager.totalSupply()Price Feed
For each xToken, a Pyth Price Feed is available for integrations in money markets and other DeFi protocols. To obtain the Pyth price feed ID for a specific xToken, please refer to the xTokens specifications documentation.
Last updated