Derivatives Trading
Last updated
Last updated
Hxro Network doesn’t just provide turnkey liquidity for on-chain derivatives. Through two core protocols (Dexterity and SPANDEX) the network also provides fundamental building blocks to developers of CLOB-based derivatives trading applications, underpinning all necessary risk and exchange infrastructure to scale derivatives markets on-chain. By composing with Hxro Network protocols, DeFi builders are given the ability to concentrate on creating unique and superior UI/UX that wins users.
Dexterity is a permissionless collection of smart contracts that allow anyone to connect to and build CLOB-based derivatives trading applications. By building on top of Dexterity, developers have access to turnkey exchange and settlement infrastructure needed to facilitate derivatives markets.
A Central Limit Order Book (CLOB) is a system used in financial markets to match buy and sell orders. Here's how it works:
Order Placement: Traders submit buy or sell orders with specific prices and quantities.
Order Matching: The CLOB constantly matches incoming orders based on their prices and timestamps.
Order Book: Organizes orders in a list, showing the best buying and selling prices.
Transparency: Traders can see all active orders, prices, and quantities.
Price Discovery: The CLOB helps determine the current market price.
CLOBs are crucial for trading efficiency and transparency in both traditional and decentralized markets.
The MPG (Market Product Group) is a collection of products (such as perps, dated futures, ZDFs, combos, etc) and their order books on Hxro’s Dexterity protocol, allowing for the exchange of risk and margin. Each MPG has its own margin vault and supports specific tokens for margin and settlement.
Within an MPG, traders create TRG (Trader Risk Group) accounts. TRG accounts are specific to the MPG they are created in and hold all trading-related information such as risk, margin, profit/loss, and orders. Put another way, creating a user account (“TRG”) linked to an MPG gives you access to trading the products included on that MPG. TRGs have health thresholds: Initial Required Margin and Maintenance Margin Requirement. Falling below these levels puts the TRG in different states: Healthy, Risk-off, or Liquidatable. SPANDEX, Dexterity's on-chain risk engine, manages these states and processes TRG accounts.
For more in-depth information on the MPGs, Products, Orderbooks, and TRGs, check out the Dexterity Explorer.
One of the biggest considerations for any derivatives trader, whether trading on-chain or off-chain, is avoiding liquidation by maintaining the collateral requirements associated with all open positions. Historically in crypto derivatives markets, the required margin put up by traders is calculated on an isolated, position-by-position basis.
The initial margin for a given position is established up front, then based on an ongoing fixed percentage of the overall position (“maintenance margin”). Failure to maintain the minimum maintenance margin requirement often results in the liquidation of your position.
When a trader has several positions open simultaneously, the total required margin can quickly stack up, making the use of their capital extremely inefficient, lowering their ROI and limiting their overall trading opportunity. While this has long been standard practice for crypto derivatives, isolated margin is suboptimal and misaligned with how traders can more efficiently account for risk.
Hxro Network’s SPANDEX is the only on-chain, real-time, portfolio-based risk and margin engine.
The goal of portfolio-based margin is for margin levels to be set in a way that more precisely reflects the actual net risk of the trader’s account. The trader can benefit from portfolio margin because resulting margin requirements are generally lower than requirements based on isolated risk.
SPANDEX real-time margin requirements are calculated by looking at the risk of the traders portfolio as a whole, rather than the more common method of calculating margin on an isolated, position-by-position basis.
By assessing collective risk at the portfolio level vs. each isolated position, SPANDEX accounts for different risk factors and adjusts account margin requirements accordingly. This means that assets in your portfolio that may have offsetting risk effects could result in significant margin requirement relief (see here for a hypothetical example of isolated vs. portfolio-based margin calculations).
To capture the greatest benefits of transparency and on-chain risk management, SPANDEX calculates risk on every market update. This may include a change in wallet balance, a change in mark price, or time to expiration. These factors can all play a role in how a portfolio’s risk is assessed. Changes in input values would therefore update the user’s risk health as well as the health of the entire market product group.