{
"owner": String,
"penalty_params": PenaltyParams
}
owner
: address of the owner of thepenalty
contractpenalty_params
: the parameters for the penalty contract
Updates general penalty contract parameters.
{
"update_config": {
"owner": Option<String>,
"penalty_params": Option<PenaltyParams>
}
}
owner
: address of the new owner of thepenalty
contractpenalty_params
: new parameters for the penalty contract.
Updates penalty contract states, EMA and last block, after a create operation.
{
"penalty_create": {
"block_height": u64,
"cluster_token_supply": Uint128,
"inventory": Vec<Uint128>,
"create_asset_amounts": Vec<Uint128>,
"asset_prices": Vec<String>,
"target_weights": Vec<Uint128>
}
}
block_height
: block height to compute the mint penalty atcluster_token_supply
total supply for the cluster tokeninventory
: current inventory of inventory assets in a clustercreate_asset_amounts
: provided asset amounts for minting cluster tokensasset_prices
: prices of the inventory assets in a clustertarget_weights
: the cluster's current inventory asset weights
Updates penalty contract states, EMA and last block, after a redeem operation.
{
"penalty_redeem": {
"block_height": u64,
"cluster_token_supply": Uint128,
"inventory": Vec<Uint128>,
"max_tokens": Uint128,
"redeem_asset_amounts": Vec<Uint128>,
"asset_prices": Vec<String>,
"target_weights": Vec<Uint128>
}
}
block_height
: the block height to compute the redeem penalty atcluster_token_supply
: total supply for the cluster tokeninventory
: current inventory of inventory assets in a clustermax_tokens
: maximum amount of cluster tokens allowed to burn for pro-rata redeemredeem_asset_amounts
: amounts expected to receive from burning cluster tokensasset_prices
: latest prices of the inventory assets in a clustertarget_weights
: the cluster's current inventory asset weights
Calculates the actual create amount after taking penalty into consideration
{
"penalty_query_create": {
"block_height": u64,
"cluster_token_supply": Uint128,
"inventory": Vec<Uint128>,
"create_asset_amounts": Vec<Uint128>,
"asset_prices": Vec<String>,
"target_weights": Vec<Uint128>
}
}
block_height
: the block height to compute the redeem mint atcluster_token_supply
: total supply for the cluster tokeninventory
: current inventory of inventory assets in a clustercreate_asset_amounts
: provided asset amounts for minting cluster tokensasset_prices
: prices of the inventory assets in a clustertarget_weights
: the cluster's current inventory asset weights
Calculates the actual redeem amount after taking penalty into consideration
{
"penalty_query_redeem": {
"block_height": u64,
"cluster_token_supply": Uint128,
"inventory": Vec<Uint128>,
"max_tokens": Uint128,
"redeem_asset_amounts": Vec<Uint128>,
"asset_prices": Vec<String>,
"target_weights": Vec<Uint128>
}
}
block_height
: the block height to compute the redeem mint atcluster_token_supply
: total supply for the cluster tokeninventory
: current inventory of inventory assets in a clustermax_tokens
: maximum amount of cluster tokens allowed to burn for pro-rata redeemredeem_asset_amounts
: amounts expected to receive from burning cluster tokensasset_prices
: prices of the inventory assets in a clustertarget_weights
: the cluster's current inventory asset weights
Returns current penalty parameters
{
"params": {}
}
Returns general contract parameters
{
"config": {}
}