Maker
The Maker contract collects part of Astroport's pair fees (according to the factory's maker_fee
). The accrued fees are swapped to ASTRO and then send to stakers and governance (according to the governance_percent
).
Links
- Contract Address: terra1ygcvxp9s054q8u2q4hvl52ke393zvgj0sllahlycm4mj8dm96zjsa45rzk
- Testnet Address: terra146ffs60x8seza3cq9a447mhw0zqeylkj37ye4uj7rl2uwhvgq89sts2ess
- Contract Repo: https://github.com/astroport-fi/astroport-core/tree/main/contracts/tokenomics/maker
- contract.rs: https://github.com/astroport-fi/astroport-core/blob/main/contracts/tokenomics/maker/src/contract.rs
- maker.rs: https://github.com/astroport-fi/astroport-core/blob/main/packages/astroport/src/maker.rs
- Tests: https://github.com/astroport-fi/astroport-core/tree/main/contracts/tokenomics/maker/tests
InstantiateMsg
Initializes the contract with required addresses and the governance_percent
.
Params | Type | Description |
---|---|---|
owner | String | Address that's allowed to change contract parameters |
astro_token_contract | String | The ASTRO token contract address |
factory_contract | String | The factory contract address |
staking_contract | String | The xASTRO staking contract address |
governance_contract | Option<String> | The governance contract address (fee distributor for vxASTRO) |
governance_percent | Option<Uint64> | The percentage of fees that go to governance_contract |
max_spread | Option<Decimal> | The maximum spread used when swapping fee tokens to ASTRO |
ExecuteMsg
collect
Swaps accrued fee tokens to ASTRO.
Params | Type | Description |
---|---|---|
assets | Vec<AssetWithLimit> | The assets to swap to ASTRO |
AssetWithLimit
This struct holds parameters to help with swapping a specific amount of a fee token to ASTRO.
update_config
Updates the contract's general settings. All fields are optional.
Params | Type | Description |
---|---|---|
factory_contract | Option<String> | The factory contract address |
staking_contract | Option<String> | The xASTRO staking contract address |
governance_contract | Option<UpdateAddr> | The governance contract address (fee distributor for vxASTRO) |
governance_percent | Option<Uint64> | The percentage of fees that go to governance_contract |
governance_contract | Option<Decimal> | The maximum spread used when swapping fee tokens to ASTRO |
UpdateAddr
This is an enum used for setting and removing a contract address.
Variants | Description |
---|---|
Set | Sets a new contract address |
Remove | Removes a contract address |
swap_bridge_assets
Swap fee tokens via bridge assets.
Params | Type | Description |
---|---|---|
assets | Vec<AssetInfo> | Information about an asset stored in a AssetInfo struct |
depth | u64 | Swap depth |
distribute_astro
Distribute ASTRO to stakers and to governance.
propose_new_owner
Creates a proposal to change contract ownership. The proposal validity period is set in the expires_in variable.
Params | Type | Description |
---|---|---|
owner | String | The newly proposed owner |
expires_in | u64 | The validity period of the proposal to change the owner |
drop_ownership_proposal
Removes the existing proposal to change contract ownership.
claim_ownership
Used to claim contract ownership, thus changing the contract's owner.
enable_rewards
Enables the distribution of current fees accrued in the contract over "blocks" number of blocks.
Params | Type | Description |
---|---|---|
blocks | u64 | Number of blocks |
QueryMsg
config
Queries information about the Maker's configuration.
balances
Queries token balances for each specified asset held by the Maker.
Params | Type | Description |
---|---|---|
assets | Vec<AssetInfo> | Assets held in Maker contract |
BalancesResponse
A custom struct used to return multiple asset balances.
Params | Type | Description |
---|---|---|
balances | Vec<Asset> | Holds the balance for assets held in the Maker contract |
bridges
Queries availiable bridges.
Returns a vector containing assets of types (String, String)