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.
#[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,}
{"distribution_contract": "terra1...","terraswap_factory": "terra1...","mirror_token": "terra1...","base_denom": "uusd" // native Terra token}
Key | Type | Description |
| HumanAddr | Contract address of Mirror Governance |
| HumanAddr | Contract address of Terraswap Factory |
| HumanAddr | Contract address of Mirror Token (MIR) |
| String | Base denomination (native Terra token denom) |
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
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum HandleMsg {Convert {asset_token: HumanAddr,}}
{"convert": {"asset_token": "terra1..."}}
Key | Type | Description |
| HumanAddr | Contract address of asset to convert |
Sends to entire balance of collector's Mirror Tokens (MIR) to distribution_contract
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum HandleMsg {Send {}}
{"send": {}}
Get the Mirror Collector contract configuration.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg {Config {}}
{"config": {}}
Key | Type | Description |