Anchor Protocol
  • Home
  • Security
  • Protocol
    • Overview
    • Bonded Assets (bAssets)
      • Bonded Luna (bLuna)
      • Bonded ETH (bETH)
    • Money Market
      • Deposit Rate Subsidization
    • Loan Liquidation
    • Anchor Token (ANC)
    • Anchor Governance
      • Modify Collateral Attributes
      • Modify Market Parameters
      • Modify Liquidation Parameters
      • Modify ANC Parameters
      • Modify Governance Parameters
      • Modify Borrow Interest
      • Modify ANC Distribution
      • Community Grants
      • Text Proposal
  • User Guide
    • Interchain Transfers
    • WebApp
      • EARN
      • BORROW
      • bASSET [bLUNA]
      • bASSET [bETH]
      • GOVERN
        • ANC - UST LP Staking
        • Anchor Governance Staking
        • Claiming ANC Rewards
        • Creating and voting on proposals
  • EthAnchor
    • EthAnchor
    • EthAnchor Contracts
      • Deployed Contracts
      • Router
      • ConversionPool
      • ExchangeRateFeeder
    • Fees
  • Developers - Earn
    • Anchor Earn SDK
    • Example Usage
    • Appendix
  • xAnchor
    • xAnchor
    • xAnchor Contracts
    • xAnchor Bridge (EVM Chains)
    • xAnchor Terra-side Contracts
      • xAnchor Core
      • xAnchor Wormhole Bridge
      • Address Proxy
  • Developers - Terra
    • Anchor.js
    • AnchorCLI
  • Smart Contracts
    • Deployed Contracts
    • bLuna
      • Hub
      • Reward
      • Rewards Dispatcher
      • Validators Registry
      • Airdrop Registry
      • Tokens: bLuna and stLuna
    • bETH
      • Reward
      • Token
      • Converter
    • Money Market
      • Overseer
      • Market
      • Custody [bLUNA]
      • Custody [bETH]
      • Interest Model
      • Distribution Model
      • Oracle
    • Liquidation
      • Liquidation Contract
      • Liquidation Queue Contract
    • Anchor Token (ANC)
      • Gov
      • Staking
      • Community
      • Collector
      • Distributor
  • Developers - Ethereum [Legacy]
    • EthAnchor
    • EthAnchor Account Contract
    • EthAnchor API
      • Getting Market Information
      • Depositing Stablecoins
      • Redeeming Stablecoins
    • Fees
  • External Resources
    • Anchor WebApp
    • Anchor Protocol GitHub
    • Terra Blockchain
Powered by GitBook
On this page
  • Config
  • InstantiateMsg
  • ExecuteMsg
  • UpdateConfig
  • Sweep
  • QueryMsg
  • Config
  • ConfigResponse

Was this helpful?

  1. Smart Contracts
  2. Anchor Token (ANC)

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

#[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,
}
{
  "gov_contract": "terra1...", 
  "terraswap_factory": "terra1...", 
  "anchor_token": "terra1...", 
  "distributor_contract": "terra1...", 
  "reward_factor": "0.5" 
}

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.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        reward_factor: Option<Decimal>, 
    }
}
{
  "update_config": {
    "reward_factor": "0.5" 
  }
}

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.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Sweep {
        denom: String, 
    }
}
{
  "sweep": {
    "denom": "uusd" // Terra USD
  }
}

Name

Type

Description

denom

String

Denomination of stablecoin to swap

QueryMsg

Config

Gets the Collector contract configuration.

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

Name

Type

Description

ConfigResponse

#[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,
}
{
  "gov_contract": "terra1...", 
  "terraswap_factory": "terra1...", 
  "anchor_token": "terra1...", 
  "distributor_contract": "terra1...", 
  "reward_weight": "0.5" 
}

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

PreviousCommunityNextDistributor

Last updated 3 years ago

Was this helpful?