Skip to main content

Overview

The Marketmap module is responsible for managing and storing a configuration that informs the Connect oracle of which markets to fetch data for, and which providers to use to fetch them.

Concepts

Authority, Admin, And MarketAuthority

The Marketmap module contains three levels of access to interact with the module.

Authority

The Authority is the only account allowed to change the module’s Params. By default, this account is set to the governance address. However, you may edit the configuration of the module to be any address.

Admin

The Admin can only remove an address from the market authority list via RemoveMarketAuthorities.

MarketAuthority

A MarketAuthority is assigned by the module Authority. There can be any number of market authorities. The market authorities are able to create and update markets in the Marketmap. Specifically, only a MarketAuthority may send the following transactions:
  • CreateMarkets
  • UpdateMarkets
  • UpsertMarkets

Market

A market consists of a Ticker (i.e. BTC/USD) and a list of ProviderConfigs. A Ticker contains data about a specific currency pair. A ProviderConfig contains data that informs the Oracle of how to query for the currency pair in the Ticker.

ProviderConfig

The Name field refers to one of the providers listed in the Providers document.

Ticker

Params

Params define the authenticated addresses that can mutate the state of the Marketmap.

Messages

The following messages can be included in transactions to mutate the state of the Marketmap.

MsgCreateMarkets

MsgCreateMarket creates a new Market.

MsgUpdateMarkets

MsgUpdateMarkets updates an existing Market.

MsgUpsertMarkets

MsgUpsertMarkets will update a Market if one already exists. If a Market does not exist, it will create one instead.

MsgParams

MsgParams updates the Marketmap parameters.

MsgRemoveMarketAuthorities

MsgRemoveMarketAuthorities removes a market authority from the Params.

Queries

The following queries are available to retrieve data about the state of the Marketmap.

MarketMap

The Marketmap query returns the full Marketmap in state. Request:
Response:

Market

Market returns a specific Market from the Marketmap. Request:
Response:

LastUpdated

LastUpdated returns the height at which the Marketmap was last updated. Request:
Response:

Params

Params returns the Marketmap’s Params. Request:
Response:

Proto Definitions

Proto definitions for all types, queries, and messages can be found here.