This contract stores information and functionalities related to the individual Nebula cluster. These includes the methods for rebalancing the cluster inventory, updating the cluster's target weights, and decommissioning the cluster. It also facilitates querying information related to the cluster, including the cluster's name/description/inventory composition, penalty and target oracle address, the inventory asset prices, and its outstanding balance.
{
"owner": String,
"factory": String,
"name": String,
"description": String,
"cluster_token": Option<String>,
"pricing_oracle": String,
"target_oracle": String,
"target": Vec<Asset>,
"penalty": String
}
owner
: address of the owner of thecluster
contractfactory
: cluster factory contract addressname
: cluster namedescription
: cluster descriptioncluster_token
: cluster token contract addresspricing_oracle
: address of price oracle use to calculate the prices of the cluster's inventorytarget_oracle
: address of target oracle allowed to update the cluster's target weightstarget
: cluster's target inventory asset weightspenalty
: penalty function contract address used by the cluster
Updates contract variables
{
"update_config": {
"owner": Option<String>,
"name": Option<String>,
"description": Option<String>,
"cluster_token": Option<String>,
"pricing_oracle": Option<String>,
"target_oracle:" Option<String>,
"penalty": Option<String>,
"target": Option<Vec<Asset>>
}
}
owner
: address of the new owner of thecluster
contractname
: cluster namedescription
: cluster descriptioncluster_token
: cluster token contract addresspricing_oracle
: address of price oracle use to calculate the prices of the cluster's inventorytarget_oracle
: address of target oracle allowed to update the cluster's target weightstarget
: cluster's target inventory asset weightspenalty
: penalty function contract address used by the cluster
Performs a CREATE/mint
operation on cluster, depositing the cluster's inventory assets and minting new cluster tokens
{
"rebalance_create": {
"asset_amounts": Vec<Asset>,
"min_tokens": Option<Uint128>
}
}
asset_amounts
: asset amounts deposited for minting/rebalancingmin_tokens
: minimum cluster tokens to receive
Performs a REDEEM/burn
operation on the cluster, burning cluster tokens in exchange for the cluster's inventory assets
{
"rebalance_redeem": {
"asset_amounts": Option<Vec<Asset>>,
"max_tokens": Uint128
}
}
asset_amounts
: list of assets and asset weights to receive from burning the cluster tokens (putting this asNone
will do a pro-rata redeem based on the cluster's current inventory asset and weights)min_tokens
: maximum amount of cluster tokens to spend to receive the inventory assets
Updates the target inventory asset weights (only callable by the cluster's owner or target oracle)
{
"update_target": {
"target": Vec<Asset>
}
}
target
: list of new target inventory asset and weights (Asset
is an Astroport type defined here)
Decommissions the cluster, marking it as inactive and disabling all functionality excluding pro-rata redeeming of the cluster's inventory assets.
{
"decommission": {}
}
Returns the current configuration information for the contract
{
"config": {}
}
Returns the current target asset and weights saved in the contract.
{
"target": {}
}
Returns the current cluster state, including
- the
outstanding_balance_tokens
(cluster token total supply), - the latest
prices
of the inventory assets - the amounts of each assets currently in the cluster's inventory
- the cluster's penalty contract address
- the cluster's token contract address
- the cluster's
target
- the cluster's status
{
"cluster_state": {}
}
Returns the current cluster state, including its name and description
{
"cluster_info": {}
}