Page cover

🔖Market

Purpose and Functionality

The Market contract is the core component of the Yield Harbour protocol, responsible for managing order books and facilitating options trading. It serves as a decentralized order book that handles bids and asks for multiple strike prices within a given epoch.

Epochs and Strike Prices

An epoch represents the timeframe during which a specific set of market and option contracts are valid. For example, an epoch could span two weeks for a fortnightly options market.

At the beginning of each epoch, the Market contract interacts with the Price Engine to determine the appropriate strike prices for which order books should be created. These strike prices are derived from the underlying asset's price and volatility calculations.

Order Book Management

The Market contract manages multiple order books, one for each strike price determined during epoch initialization. These order books facilitate the trading of options contracts by matching bids and asks submitted by market participants.

Pricing and Order Submission

When users submit orders (bids or asks), the Market contract interacts with the Price Engine to calculate the appropriate pricing for the options contracts being traded. This pricing takes into account various factors, such as the underlying asset's price, volatility, and time to expiration.

Tokenization of Options Contracts

One of the unique features of the Market contract is its ability to tokenize options contracts. This tokenization process allows options contracts to become fungible tokens within the Kujira ecosystem, enabling users to freely trade or resell their options tokens outside of the Yield Harbour market.

Interaction with Other Contracts

The Market contract interacts with several other contracts within the Yield Harbour protocol:

  1. Price Engine: The Market contract relies on the Price Engine to determine strike prices during epoch initialization and to calculate pricing for order submissions.

  2. Price History: The Price Engine, in turn, utilizes historical price data from the Price History contract to compute volatility and other pricing parameters.

  3. Denom Mapper: The Market contract interacts with the Denom Mapper to ensure seamless interaction with oracles and token representations.

Data Storage and Retrieval

The Market contract stores and manages order book data, including open orders, trades, and other market-related information, on-chain for transparency and immutability.

Querying and Accessing Market Data

Market participants can query the Market contract to retrieve information about open order books, historical trades, and other market-related data.

Upgrade and Migration Processes

The Market contract is owned and managed by Yield Harbour, with upgrade and migration processes governed by the Kujira on-chain governance system.

Governance Summary

The Market contract is the cornerstone of the Yield Harbour protocol, facilitating decentralized options trading through the management of order books and strike prices. It operates within the framework of epochs, with each epoch representing a specific timeframe for which a set of market and option contracts are valid.

At the beginning of each epoch, the Market contract interacts with the Price Engine to determine the appropriate strike prices based on the underlying asset's price and volatility calculations. It then creates and manages multiple order books, one for each strike price, allowing market participants to submit bids and asks for options contracts.

The Market contract also features a unique tokenization function, enabling options contracts to be converted into fungible tokens within the Kujira ecosystem. This tokenization process promotes liquidity and allows users to freely trade or resell their options tokens outside of the Yield Harbour market.

The Market contract relies on several other contracts within the Yield Harbour protocol, including the Price Engine for pricing calculations, the Price History for historical price data, and the Denom Mapper for seamless interaction with oracles and token representations.

The contract stores and manages order book data, trades, and other market-related information on-chain, ensuring transparency and immutability. Market participants can query the contract to retrieve information about open order books, historical trades, and other market data.

The Market contract is owned and managed by Yield Harbour, with upgrade and migration processes governed by the Kujira on-chain governance system. As the core component of the Yield Harbour protocol, the Market contract plays a crucial role in enabling decentralized options trading and promoting liquidity within the Kujira ecosystem.

Last updated