Vault Metadata
Read-only functions to fetch basic vault information like TVL and share value.
Introduction
Basic read-only
functions that provide information about the vault. These can be done without having a users wallet connected and are meant to provide and show basic data about the vault.
fetchTotalAssets
This function retrieves a vaults TVL in terms of the baseAsset of the vault.
Inputs
- None
Outputs
- A promise that returns the decimal adjusted (human readable) total asset numerical value of the vault (aka TVL) in terms of the baseAsset
Example
fetchShareValue
This function provides the value for 1 share of the vault in terms of the underlying baseAsset.
Inputs
- None
Outputs
- A promise that returns the decimal adjusted (human readable) numerical value for 1 share in terms of the underlying baseAsset.