Collector
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

Name
Type
Description
gov_contract
CanonicalAddr
Contract address of Gov
terraswap_factory
CanonicalAddr
Contract address of Terraswap Factory
anchor_token
CanonicalAddr
Contract address of Anchor Token (ANC)
distributor_contract
CanonicalAddr
Contract address of Distributor
reward_factor
Decimal
Ratio of purchased ANC distributed to ANC stakers

InstantiateMsg

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct InstantiateMsg {
3
pub gov_contract: String,
4
pub terraswap_factory: String,
5
pub anchor_token: String,
6
pub distributor_contract: String,
7
pub reward_factor: Decimal,
8
}
Copied!
1
{
2
"gov_contract": "terra1...",
3
"terraswap_factory": "terra1...",
4
"anchor_token": "terra1...",
5
"distributor_contract": "terra1...",
6
"reward_factor": "0.5"
7
}
Copied!
Name
Type
Description
gov_contract
String
Contract address of Gov
terraswap_factory
String
Contract address of Terraswap Factory
anchor_token
String
Contract address of Anchor Token (ANC)
distributor_contract
String
Contract address of Distributor
reward_factor
Decimal
Ratio of purchased ANC distributed to ANC stakers

ExecuteMsg

UpdateConfig

Updates the Collector contract configuration.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
UpdateConfig {
5
reward_factor: Option<Decimal>,
6
}
7
}
Copied!
1
{
2
"update_config": {
3
"reward_factor": "0.5"
4
}
5
}
Copied!
Name
Type
Description
reward_factor*
Decimal
New ratio of purchased ANC distributed to ANC stakers
* = 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
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
Sweep {
5
denom: String,
6
}
7
}
Copied!
1
{
2
"sweep": {
3
"denom": "uusd" // Terra USD
4
}
5
}
Copied!
Name
Type
Description
denom
String
Denomination of stablecoin to swap

QueryMsg

Config

Gets the Collector contract configuration.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Config {}
5
}
Copied!
1
{
2
"config": {}
3
}
Copied!
Name
Type
Description

ConfigResponse

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct ConfigResponse {
3
pub gov_contract: String,
4
pub terraswap_factory: String,
5
pub anchor_token: String,
6
pub distributor_contract: String,
7
pub reward_factor: Decimal,
8
}
Copied!
1
{
2
"gov_contract": "terra1...",
3
"terraswap_factory": "terra1...",
4
"anchor_token": "terra1...",
5
"distributor_contract": "terra1...",
6
"reward_weight": "0.5"
7
}
Copied!
Name
Type
Description
gov_contract
String
Contract address of Gov
terraswap_factory
String
Contract address of Terraswap Factory
anchor_token
String
Contract address of Anchor Token (ANC)
distributor_contract
String
Contract address of Distributor
reward_factor
Decimal
Ratio of purchased ANC distributed to ANC stakers
Last modified 3mo ago