- The assets supported in the vault,
- The strategies the vault uses,
- The rebalancing actions taken by the Vault Manager.
๐ก What is Vault Price Per Share? Just like strategies have a price per share, the vault itself has a price per share that shows how much 1 share of the vault is worth. This includes:
- All the strategies the vault uses,
- How much is allocated to each strategy,
- And how well each strategy is performing.
๐งฎ How to Get the Vault Price Per Share
There are two main ways to calculate it. Both give the same result.โ
Method 1: Use the Contract Function get_asset_amounts_per_shares
Vecof asset amounts per share. Each amount matches the asset at the same index in the vaultโs asset list.
To calculate the vault share price in a specific pricing currency (e.g. USD):
Where:
VAmount_i= amount of assetiper share fasdfAsset Price_i= price of asseti(from an oracle or external source)
get_asset_amounts_per_shares.
โ Method 2: Use Vault Events
Each time someone deposits or withdraws from the vault, deposit and withdraw events are emitted:total_supply_beforeโ the number of vault shares before the actiontotal_managed_funds_beforeโ a list of all asset allocations
Total Asset Amount= sum of all units of that one asset held by the vault (fromtotal_managed_funds_before[0].total_amount)Total Supply= number of shares before the action (fromtotal_supply_before)
๐ How to Calculate Vault APY
Once you have the Vault PPS at two different points in time, you can calculate APY using the same method as when is calculated for strategies: Then annualize it: Wheredays is the number of days between the two PPS values.