> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/trading/real-world-assets-rwas/rwa-pricing-mechanism.md).

# RWA Pricing Mechanism

RWA pricing is derived from two primary sources: external oracle feeds (e.g., Chainlink, Pyth, Stork, and other exchanges) and internal pricing.

* The index price is calculated according to the pricing methodology defined below.
* The only change is that the `cexPrices` component is replaced with the pricing methodology defined below.

### **Pricing Transition**

External oracle feeds are the primary price source. When oracle data becomes stale, the pricing mechanism gradually shifts from oracle-based pricing to internal pricing. As soon as an external price is available, the internal price is going to instantly converge to it.

Weights are normalized across sources. On each tick where an external price is not available:

1. Apply exponential decay to the oracle source
2. Allocate the remaining weight to the internal source

#### **Reweighing Formula (stale oracle prices):**

$$
w\_{\text{oracle}}(t)
=====================

w\_{\text{oracle}}(t - 1)\cdot e^{-\frac{\Delta t}{\tau\_{\text{oracle}}}}
$$

$$
w\_{\text{internal}}(t)
=======================

1 - w\_{\text{internal}}(t)
$$

Where:

* Δt: time elapsed since the last update
* τ\_active: source-specific time constant

#### Time Constants&#x20;

The time constant could vary by price type (index vs. mark).

* $$\tau\_{\text{mark}} = 1 \text{ minute}$$
* $$\tau\_{\text{index}} = 1 \text{ minute}$$

Note that the transition from internal to external is instant.

***

### Internal Pricing

Internal pricing is derived from order book impact prices, smoothed using a time-weighted Exponential Moving Average (EMA).

#### Time-Weighted EMA

$$
EMA\_t = \alpha \cdot P\_t + (1 - \alpha) \cdot EMA\_{t-1}
$$

$$
\alpha = 1 - e^{- \Delta t / \tau}
$$

* **Pₜ** — current impact price
* **τ** — smoothing time constant
* **Δt** — time since last update

***

### Index Price

For index price we set:

* $$\tau = 30 \text{ minutes}$$

The internal index price is capped relative to the last oracle price and the leverage of the market:

* **Indexᵢₙₜₑᵣₙₐₗ ∈ \[ P\_oracle · (1 − 1/L), P\_oracle · (1 + 1/L) ]**
  * Where **L** is leverage.

***

### Mark Price Component

For mark price we set:

* $$\tau = 2 \text{ minutes}$$

The mark price is capped relative to the last oracle price and the leverage of the market:

* **Markᵢₙₜₑᵣₙₐₗ ∈ \[ P\_oracle · (1 − 1/L), P\_oracle · (1 + 1/L) ]**

A simulation:

<figure><img src="/files/xsmUb3LkUcZJveGLv03L" alt=""><figcaption></figcaption></figure>

***

### Price Cap Removal (2026-07-10)

On the following markets there will be no price caps based on on the last oracle price:&#x20;

SPY, US500, QQQ, US100, XAU, XAG, NVDA, TSLA, AAPL, AMZN, MSFT, GOOGL, META, XCU, SNDK, WTI, XPD, XPT, BRENTOIL, MU, EWY, SPCX, DRAM, SOXL, SKHYNIXUSD, SAMSUNGUSD, INTC, NATGAS, IBM, AMD, MSTR

To prevent manipulation attacks, internal prices will continue to be validated against prices from other trading venues.
