Pricing roles
| Price type | Role |
|---|---|
| Index price | External anchor from market data feeds |
| EMA | Smoothed spread component between DerivaDEX market price and the underlying index |
| Mark price | Risk and liquidation reference price used in margin checks |
Use this page when
| If you need… | Use this page because… |
|---|---|
| the public baseline for mark-price construction | it names the inputs, adjustment, and clamp behavior explicitly |
| to understand why liquidation and deviation checks reference mark price | it shows how the risk price is formed and where it is used |
| to distinguish external index inputs from internal risk-price use | it separates those pricing roles clearly |
Repo-defined spot-index and gateway sources
| Underlying index | Gateways in repo specs | Hostnames |
|---|---|---|
BTC | Gemini BTCUSD, Binance BTCUSDC, Coinbase BTC-USD | api.gemini.com, api.binance.com, api.coinbase.com |
ETH | Gemini ETHUSD, Binance ETHUSDC, Coinbase ETH-USD | api.gemini.com, api.binance.com, api.coinbase.com |
SPCX | GeckoTerminal token-address lookup | api.geckoterminal.com |
DDX internal discount/oracle path | CoinGecko token-address lookup | api.coingecko.com |
Mark-price construction
| Element | Contract |
|---|---|
| Base input | Current index price |
| Adjustment | EMA spread component |
| Clamp | Mark price is clamped to 50 bps above or below index price |
| Realtime feed | MARK_PRICE includes price and funding-rate updates |
Fair-price and EMA inputs
| Input case | Public reading |
|---|---|
| bid and ask both present | midpoint is used as the fair-price input |
| only bid present | bid is used as the fair-price input |
| only ask present | ask is used as the fair-price input |
| no book price present | index price is used as the fallback fair-price input |
Pre-trade and execution price checks
| Check | Contract |
|---|---|
| Taker/limit deviation check | Explicitly priced requests can fail during sequencing when price deviates too far from mark price |
| Matching price banding | When no explicit taker limit exists, matching bounds market orders by product max_taker_price_deviation around mark; explicit limit orders stop at their taker price first |
| No mark available | Request can fail with MarketPriceNotAvailable |
Reading notes
| Topic | Public reading |
|---|---|
| index versus mark | index is the external anchor; mark is the risk and liquidation reference derived from that anchor plus spread logic |
| clamp behavior | mark is bounded relative to index rather than allowed to drift arbitrarily |
| missing mark state | requests can fail instead of trading against stale or absent risk inputs |
Price-band reference
The execution guard model uses product-specificmax_taker_price_deviation bands around mark price. The effective band is product-specific, for example 0.02 on ETHP/BTCP/SPCXP and 0.1 on test-only DOGEP.