Collector

The Collector accumulates fee rewards generated from CDP withdrawal within the protocol, and converts them into UST in order to purchase MIR from the MIR-UST Terraswap pool. The MIR is then sent to the Gov Contract to supply trading fee rewards for MIR stakers.

InitMsg

Rust
JSON
Rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InitMsg {
pub distribution_contract: HumanAddr,
pub terraswap_factory: HumanAddr,
pub mirror_token: HumanAddr,
pub base_denom: String,
}
JSON
{
"distribution_contract": "terra1...",
"terraswap_factory": "terra1...",
"mirror_token": "terra1...",
"base_denom": "uusd" // native Terra token
}

Key

Type

Description

distribution_contract

HumanAddr

Contract address of Mirror Governance

terraswap_factory

HumanAddr

Contract address of Terraswap Factory

mirror_token

HumanAddr

Contract address of Mirror Token (MIR)

base_denom

String

Base denomination (native Terra token denom)

HandleMsg

Convert

Depending on asset_token, performs one of the following:

  • if asset_token is an mAsset, sells the contract's balance of that mAsset for UST on Terraswap

  • if asset_token is the MIR token, buys MIR off the MIR/UST Terraswap pool with the contract's UST balance

Rust
JSON
Rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum HandleMsg {
Convert {
asset_token: HumanAddr,
}
}
JSON
{
"convert": {
"asset_token": "terra1..."
}
}

Key

Type

Description

asset_token

HumanAddr

Contract address of asset to convert

Send

Sends to entire balance of collector's Mirror Tokens (MIR) to distribution_contract

Rust
JSON
Rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum HandleMsg {
Send {}
}
JSON
{
"send": {}
}

QueryMsg

Config

Get the Mirror Collector contract configuration.

Rust
JSON
Rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Config {}
}
JSON
{
"config": {}
}

Key

Type

Description