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.

Weights are always normalized across sources. On each update:

  1. Determine the active price source (oracle or internal)

  2. Apply exponential decay to the inactive source

  3. Allocate the remaining weight to the active source

Reweighing Formula:

winactive(t)=winactive(t1)eΔtτactivew_{\text{inactive}}(t) = w_{\text{inactive}}(t - 1)\cdot e^{-\frac{\Delta t}{\tau_{\text{active}}}}
wactive(t)=1winactive(t)w_{\text{active}}(t) = 1 - w_{\text{inactive}}(t)

Where:

  • Δt: time elapsed since the last update

  • τ_active: source-specific time constant

Time Constants

The time constant varies by transition direction (internal ↔ external) and by price type (index vs. mark).

  • τinternalmark=12 minutes\tau_{\text{internal}}^{\text{mark}} = 12 \text{ minutes}

  • τexternalmark=1 minute\tau_{\text{external}}^{\text{mark}} = 1 \text{ minute}

  • τinternalindex=3 hours\tau_{\text{internal}}^{\text{index}} = 3 \text{ hours}

  • τexternalindex=8 minutes\tau_{\text{external}}^{\text{index}} = 8 \text{ minutes}


Internal Pricing

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

Time-Weighted EMA

EMAt=αPt+(1α)EMAt1EMA_t = \alpha \cdot P_t + (1 - \alpha) \cdot EMA_{t-1}
α=1eΔt/τ\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:

  • τ = 2 hours

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

  • Indexᵢₙₜₑᵣₙₐₗ ∈ [ P_oracle · (1 − 1/L + 0.5%), P_oracle · (1 + 1/L − 0.5%) ]

    • Where L is leverage.


Mark Price Component

For mark price we set:

  • τ = 8 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:


Non-USD* Quoted Perpetual Contracts

Future improvements

The EMA values used for the internal index and mark prices will be initialized using the most recent oracle price.

Last updated