Project type: Decentralised Exchange

Derivatives Trading | HxroMoreSearchCtrl + K* HXRO NETWORK
+ Welcome to Hxro Network
* SAMM Protocol Litepaper - v1.1
* TOKENOMICS AND STAKING
- Transfer HXRO from ERC20 to SPL via Wormhole
- Claim an esHXRO Airdrop
- How to Stake HXRO
- How to Vest esHXRO
- How to Initialize and Claim Rewards
* NETWORK REWARDS AND INCENTIVES
- Python & Typescript SDKs
- Dexterity Typescript SDK QuickStart
- Dexterity Typscript Scripts
- DEX Reference Implementations
- Parimutuel Typescript SDK QuickStart
- Parimutuel Typescript + React Project
- Developer Grant FAQs
+ Market Maker Reference Implementation
+ Staking Contract Audit
+ Governance, Staking, and Rewards Portal 
- Brand and Press
Powered by GitBook cover image](~gitbook/image?url=https%3A%2F%2F1204672629-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FnBRfy9TZFugEQMxYK4Hk%252Fuploads%252F9FoJqYzJJndLTqgEH9IP%252FGroup%25201321314215%2520%282%29.png%3Falt%3Dmedia%26token%3D4ab42685-93e0-4761-9c8e-12f312e79413&width=1248&dpr=4&quality=100&sign=2575ffa4&sv=1)On this page* Dexterity Protocol - Whitepaper v1.0 - March 2022
* SPANDEX Risk Engine
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 Protocol -Whitepaper v1.0 - March 2022 
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.
#### MPGs and TRGs
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.
### SPANDEX Risk Engine
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.
#### Isolated vs. Portfolio Risk and Margin
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).
#### Real-Time Risk Updates
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.
Last updated 9 months ago