> For the complete documentation index, see [llms.txt](https://docs.hello.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello.trade/about/trading/pricing.md).

# Pricing

## Overview

HelloTrade employs a sophisticated pricing system that adapts to market conditions. The system distinguishes between **Index Price** and **Mark Price**, each serving specific purposes in the trading and risk management lifecycle.

Both Mark and Index Prices are computed from multiple data providers:

* Chainlink
* Stork
* Massive.io
* Direct exchange and ATS feeds

***

## Index Price

The index price represents the fair value of the underlying asset based on external market data.

### Computation

**Normal Market Hours (Equity 24/5, Crypto 24/7):**

Index price is computed as a **weighted median** of prices from multiple data providers:

Weights are distributed evenly across sources and updated as needed based on data quality and availability.

**Scheduled Market Closures (Weekends & Holidays):**

During scheduled closures (8PM Friday - 8PM Sunday for equities):

1. Index price is **initialized at the closing price** when markets close
2. Updates incrementally based on the **impacted price difference (IPD)** with a 1-hour exponentially weighted moving average time constant.
   * `IPD = max(Impact Bid - Index, 0) - max(Index - Impact Ask, 0)`

### Oracle Publishing

The index price is computed off-chain by the data engine and published to an on-chain oracle network for validation and synchronization across systems.

***

## Mark Price

The mark price is used for:

* Position valuation
* Unrealized PnL calculation
* Liquidation price determination
* Margin calculations

### Computation

**Normal Market Hours:**

Mark price is the **median** of the following three components:

1. **Index price adjusted for funding**

   ```
   Index Price × (1 + Hourly Funding Rate × (Time Until Next Funding / Funding Period))
   ```
2. **Median of order book data**

   ```
   median(Best Bid, Best Ask, Last Trade)
   ```
3. **Index price with market premium/discount**

   ```
   Index Price + 150s EMA(Mid Price - Index Price)
   ```

**Scheduled Market Closures:**

Mark price uses the **same candidates as normal hours** (see above). A **price band** clamps the mark price to prevent extreme deviations from the market close reference price.

### Oracle Publishing

Mark price is computed off-chain per-second and published to an on-chain oracle to validate liquidations and ensure system synchronization.

***

## Exchange Modes & Banding

HelloTrade operates in different modes based on underlying market conditions.

### Mode 1: Normal Operation (Liquid Markets)

**Market Hours:**

* Equities: 24/5 (Sunday 8PM - Friday 8PM)
* Crypto: 24/7

**Characteristics:**

* Index price from live feeds
* Standard mark price computation
* Funding distributed hourly

### Mode 2: Scheduled Market Closures

**When:** Weekends (8PM Friday - 8PM Sunday), Holidays

**Characteristics:**

* Index price anchored to closing price, updated via EMA of book price
* Same mark price candidates as normal hours
* **Strict price bands**: +/- 10% from 8PM reference price
  * Prevents market manipulation
  * Limits forced liquidations
  * Caps directional risk for makers
* Funding distributed every hour

### Mode 3: Unscheduled Halts

**Trading Halts (LULD, News Pending, Regulatory):**

When programmatic halt feeds detect market disruptions:

* Tighten open interest caps
* Switch to secondary feeds or fallback pricing
* Maintain trading where possible
* Switch to hourly funding if halt exceeds 1 hour

**Common Halt Types:**

| Halt Type                        | Duration | Frequency      | DEX Response                          |
| -------------------------------- | -------- | -------------- | ------------------------------------- |
| LULD pause                       | \~5 min  | 80% of halts   | Default (tighten OI, secondary feeds) |
| News pending/released            | \~15 min | 14% of halts   | Default                               |
| Regulatory concern               | Varies   | 1% of halts    | Default                               |
| ETF indicative value unavailable | \~5 min  | <0.1% of halts | Default                               |

### Mode 4: Scheduled Events

<table><thead><tr><th width="269.57421875">Event</th><th>DEX Handling</th></tr></thead><tbody><tr><td><strong>Stock Split</strong></td><td>Temporary halt. Adjust index price and re-denominate position sizes.</td></tr><tr><td><strong>Mergers &#x26; Acquisitions</strong></td><td>Temporary halt. Case-by-case: adjust pricing or delist asset.</td></tr><tr><td><strong>New Security Offering</strong></td><td>Switch price feed when live feeds become available (Pre-IPO only).</td></tr><tr><td><strong>Bankruptcy / Delisting</strong></td><td>ADL and close all positions at last reliable price. Delist from trading.</td></tr><tr><td><strong>Dividend Payment</strong></td><td>No pass-through to position holders. Spot reference price accounts for fair value adjustment.</td></tr><tr><td><strong>Earnings Announcements</strong></td><td>Reject new market and limit orders from takers 5 minutes before scheduled calls.</td></tr></tbody></table>

***

## Funding Rates

Funding rates ensure perpetual contract prices converge with spot prices. Funding payments are exchanged directly between long and short positions based on the premium index (deviation between mark prices and index price).

**Key Parameters:**

* **Sampling:** Every second
* **Distribution:** Every hour
* **Rate Caps:** Maximum ±1% per hour

See [Funding](/about/trading/funding.md) for detailed formulas, calculation methodology, and examples.

***
