Collateral Oracle
Collateral Oracle contract manages a directory of whitelisted collateral assets, providing the necessary interfaces to register and revoke assets. Mint contract will fetch prices from collateral oracle to determine the C-ratio of each CDP. The Collateral Oracle fetches prices from different sources on the Terra ecosystem, acting as a proxy for Mint Contract.
InitMsg
Key | Type | Description |
---|---|---|
| HumanAddr | Address of owner |
| HumanAddr | Address of Mirror Mint contract |
| String | Asset in which prices will be denominated in (default TerraUSD) |
| HumanAddr | Address of MIR token oracle feeder |
| HumanAddr | Address of ANC token oracle feeder |
| HumanAddr | Address of Band Protocol oracle feeder |
HandleMsg
UpdateConfig
UpdateConfig
This function can be only issued by the active owner of the Collateral Oracle contract. Changes the configuration of collateral oracle contract.
Key | Type | Description |
---|---|---|
| HumanAddr | Address of owner |
| HumanAddr | Address of Mirror Mint contract |
| String | Asset in which prices will be denominated in (default TerraUSD) |
| HumanAddr | Address of MIR token oracle feeder |
| HumanAddr | Address of ANC token oracle feeder |
| HumanAddr | Address of Band Protocol oracle feeder |
*= optional
RegisterCollateralAsset
RegisterCollateralAsset
Registers a new type of collateral to be used on Mirror Mint contract for the creation of new CDP. Can only be issued by the owner of Collateral Oracle.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset to be registered |
| SourceType | Base64-encoded string of JSON of Receive Hook |
| Decimal | Multiplied to |
SourceType
SourceType
Key | Type | Description |
---|---|---|
| Binary | Queries information of Terra's oracle |
| Binary | Queries information of Band Protocol oracle |
| Decimal | Fixed price to be used for the collateral type (aUST = 1 UST) |
| Binary | Queries information of Terraswap Pair |
| String | Used to calculate UST denominated price of an asset when the asset does not have UST pair pool |
| Binary | Query to fetch information for Anchor Protocol's asset information (ANC) |
| String | String denomination of the Terra native asset (uusd) |
RevokeCollateralAsset
RevokeCollateralAsset
Removes registered collateral so that it is no longer used as collateral for Mirror Mint. Can only be issued by the owner of Collateral Oracle.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset to be revoked |
UpdateCollateralPriceSource
UpdateCollateralPriceSource
Updates the price data source for a specific collateral asset. Can only be issued by the owner of Collateral Oracle.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset to update query information |
| SourceType | Message detailing where to query asset information from |
UpdateCollateralMultiplier
UpdateCollateralMultiplier
Updates the multiplier parameter of a specific collateral asset registered in Mirror contract. Can only be issued by the owner of Collateral Oracle.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset to change collateral premium |
| Decimal | Collateral ratio multiplied to |
QueryMsg
Config
Config
Queries the configuration of Collateral Oracle.
Response
Key | Type | Description |
---|---|---|
| HumanAddr | Address of owner |
| HumanAddr | Address of Mirror Mint contract |
| String | Asset in which prices will be denominated in (default TerraUSD) |
| HumanAddr | Address of MIR token oracle feeder |
| HumanAddr | Address of ANC token oracle feeder |
| HumanAddr | Address of Band Protocol oracle feeder |
CollateralPrice
CollateralPrice
Returns the UST price of the selected collateral asset.
Key | Type | Description |
---|---|---|
| String | Name of the collateral asset to query prices |
Response
Returns the UST price of the selected collateral asset.
Key | Type | Description |
---|---|---|
| String | Name of the collateral asset to query prices |
| Decimal | Current price of the collateral |
| Decimal | Collateral ratio added to |
| bool | Check if the collateral is registered or revoked |
CollateralAssetInfo
CollateralAssetInfo
Returns the parameter of selected collateral.
Key | Type | Description |
---|---|---|
| String | Name of the collateral asset to query prices |
Response
Key | Type | Description |
---|---|---|
| String | Name of the collateral asset to query prices |
| Decimal | Collateral ratio added to |
| WasmQuery | Queries the public API of another contract at a known address (with known ABI) return value is whatever the contract returns (caller should know) |
| bool | Check if the collateral is registered or revoked |
CollateralAssetInfos
CollateralAssetInfos
Returns parameters for multiple collateral assets.
Response
Key | Type | Description |
---|---|---|
| Vec<CollateralInfoResponse> | Array of |
Last updated