The Collector accumulates Anchor protocol fees and swaps them to ANC through the ANC <> UST Terraswap pair. Swapped ANC tokens are distributed to ANC stakers (sent to Gov contract).
Config
InstantiateMsg
Rust JSON
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct InstantiateMsg {
pub gov_contract : String ,
pub terraswap_factory : String ,
pub anchor_token : String ,
pub distributor_contract : String ,
pub reward_factor : Decimal ,
}
Copy {
"gov_contract" : "terra1..." ,
"terraswap_factory" : "terra1..." ,
"anchor_token" : "terra1..." ,
"distributor_contract" : "terra1..." ,
"reward_factor" : "0.5"
}
ExecuteMsg
UpdateConfig
Updates the Collector contract configuration.
Rust JSON
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
UpdateConfig {
reward_factor : Option < Decimal >,
}
}
Copy {
"update_config" : {
"reward_factor" : "0.5"
}
}
* = optional
Sweep
Can be issued by anyone to swap denom
Terra stablecoins in the Collector contract to ANC tokens. Afterwards, distributes reward_factor
portion of swapped ANC tokens to ANC stakers. Can be issued by anyone.
Rust JSON
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
Sweep {
denom : String ,
}
}
Copy {
"sweep" : {
"denom" : "uusd" // Terra USD
}
}
QueryMsg
Config
Gets the Collector contract configuration.
Rust JSON
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum QueryMsg {
Config {}
}
ConfigResponse
Rust JSON
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct ConfigResponse {
pub gov_contract : String ,
pub terraswap_factory : String ,
pub anchor_token : String ,
pub distributor_contract : String ,
pub reward_factor : Decimal ,
}
Copy {
"gov_contract" : "terra1..." ,
"terraswap_factory" : "terra1..." ,
"anchor_token" : "terra1..." ,
"distributor_contract" : "terra1..." ,
"reward_weight" : "0.5"
}