The Treasury contract is the holder of the Protocol Owned Liquidity and is able to maintain a series of registered helper smart contracts, which we call 'dapps', to prepare messages for various operations. Only whitelisted addresses are able to forward messages for execution.
The treasury also has internal value calculation logic. This logic is enable by the VaultAsset class in which each VaultAsset, apart from the base reference (UST for example), has a value reference (ValueRef). The value reference provides a way to calculate the value of the asset held in the treasury given a correct configuration.
pub enum QueryMsg {
/// Returns the treasury Config
Config {},
/// Returns the total value of all held assets
TotalValue {},
/// Returns the value of one specific asset
HoldingValue { identifier: String },
/// Returns the amount of specified tokens this contract holds
HoldingAmount { identifier: String },
/// Returns the VAULT_ASSETS value for the specified key
VaultAssetConfig { identifier: String },
}