# Oracle Pricing (/docs/risex/trading/oracle-pricing)

RISEx works directly with [Stork](https://docs.stork.network/), an independent oracle provider, to pull in its index prices. The following external/calculated prices are used when keeping the exchange functional:

* **Index price:** The index price is used in the funding rate and mark price formulas. The index price is pulled directly from Stork and is the median of the spot price across multiple CEX providers
* **Mark price:** The mark price is the median of three price calculations *(see calcs below)*. The mark price is used to determine the users uPnL and is also the price used in determining whether a user should be liquidated.

***

## Mark Price Calculation Methodology

The mark price is determined by taking the median of three different prices: $\text{mark} = \text{median}(P_1,\ P_2,\ P_3)$

### P1: Index-anchored premium

Look at the premium or discount our book is trading at against the index.

$$
\text{impactNotional} = \frac{50\ \text{USDC}}{\text{initialMarginFraction}}
$$

* $\text{impactBid}$: average fill price for a market sell of $\text{impactNotional}$
* $\text{impactAsk}$: average fill price for a market buy of $\text{impactNotional}$

$$
\text{impactPrice} = \frac{\text{impactBid} + \text{impactAsk}}{2} \\
P_1 = \text{index} + \text{EMA}_{8\text{min}}\left(\text{clamp}\left(\text{impactPrice} - \text{index},\ -\frac{\text{index}}{200},\ +\frac{\text{index}}{200}\right)\right)
$$

where $\text{clamp}(x, a, b) = \max(a, \min(b, x))$

### P2: Raw book signal

Average execution cost across both sides of the book.

$$
\text{impactNotionalAmount} = \frac{50\ \text{USDC}}{\text{initialMarginFraction}}
$$

* $\text{impactBidPrice}$: average execution price for a market sell of impact notional
* $\text{impactAskPrice}$: average execution price for a market buy of impact notional

$$
P_2 = \frac{\text{impactBidPrice} + \text{impactAskPrice}}{2}
$$

### P3: External anchor

Mark price from an external provider (Stork).

$$
P_3 = \text{median}(\text{CEX mark prices})
$$

All oracle prices are pushed directly and can be verified on RISE chain.

***

## Staleness

If a market's Stork feed goes stale (no update for **1 hour**), new orders and liquidations on that market are blocked until the feed resumes.

***

## Price Feeds

Each market's index and mark price is sourced from a dedicated Stork feed. Feed IDs are shown below.

### Index Feeds

| Symbol | Feed Name          | Feed ID                                                              |
| ------ | ------------------ | -------------------------------------------------------------------- |
| BTC    | BTCUSDC            | `0x7321ce442e8814b638e0cd241a8838e7d8222a43cbaaca78adcc2337bfa3185d` |
| ETH    | ETHUSDC            | `0x7965e1bfc07a34caf0c3aa8146b200264fbb7a0eb85b1d3b1fdceecffd736b02` |
| BNB    | BNBUSDC            | `0xee318029bdf198b1b4ee071824ae96718233f67f93d3c60dbbff63aa5978db6a` |
| SOL    | SOLUSDC            | `0x44f13af03a1774254fc6ce9e732313200accea8e6855ab16641364832acd91d8` |
| HYPE   | HYPEUSDC           | `0x46b81bfae29628bc20cac94da2b46a302f441cafd255bdbdbb7f6ef6be6860c5` |
| XRP    | XRPUSDC            | `0xc37b712464013d69a37ad9cd00872a7744ac8e23460da4911bee51c5fd99adb0` |
| TAO    | TAOUSDC            | `0xc5667cf0dfd2bec9db8caad645eddc95b7ff22f6db77ec38e6452203a31c0037` |
| ZEC    | ZECUSDC            | `0xacfbc7f251eee11bc45ecbf7dd2fab91a308d6c3e20858238143af84a07a70ee` |
| NEAR   | NEARUSDC           | `0x51d719d0729c22e788710e2587d43bcbf22307085c3f040f5dceb86fba1c542d` |
| VVV    | VVVUSDC            | `0x3d9f86d401564688eee8ce8848944ec3b0de8b1e008939a48027df4928bc324b` |
| LIT    | LITUSDC            | `0xb57cbb1082200a115403f6bd4b633a4392f86623f8ccb5d87143a95119ce500b` |
| DOGE   | DOGEUSDC           | `0xb0db2c0e6d6931626b34e4cdd38ab12a62e6a2eeadbb553dd37b4f9f6bff0368` |
| AERO   | AEROUSDC           | `0x5089e2d19b1a0ff6a9e34e65a14fa3cd55ead1691e9b964cb7e36c7ad06d9e26` |
| AAVE   | AAVEUSDC           | `0x5dc1b199a28f725383cded4cb27d71c4e170e6b1b54a0dcf5b9a46b9acd6fdd3` |
| PUMP   | PUMPUSDC           | `0xe93d68c9be4688fa0a1e6566ca44493ef14e94545704dbef1d6c12527779e818` |
| XAU    | XAUUSDT\_IDX\_BIF  | `0xbea521f7997d1474e45b5fb4975af34fb131e96b2e57e0e9b54c0f6a1777dd0b` |
| XAG    | XAGUSDT\_IDX\_BIF  | `0xd2c227caa5e3f9014222cce3f20826cda74e176c705fc9ea20092edbd49cf966` |
| CL     | CLUSDT\_IDX\_BIF   | `0xf946c7c4b2d08af0688bcc29cdf56be35dc5786d401ec4af50460d6b09257391` |
| BZ     | BZUSDT\_IDX\_BIF   | `0xe277d1bd8e559f3eee28dbcc426dee61c4f59ccda7282ad822d89ea23676a65c` |
| SNDK   | SNDKUSDT\_IDX\_BIF | `0xb00ee539498538235e2716abd38624f59db010e2d86d2776f57fa6607ada3140` |
| SPCX   | SPCXUSDT\_IDX\_BIF | `0x2fd192a7e7a890e7339f19cfe07b3fcc15a114dbb7d93cc952ee17b4e964a58e` |
| DRAM   | DRAMUSDT\_IDX\_BIF | `0x5ff35edc8633a51922795772c412f303055a25629aa0dd42dd548d41d9785882` |
| MU     | MUUSDT\_IDX\_BIF   | `0x8acd1cce6e62e87a3d9a4d88958f28aa14bf64ed37fe44f09290408566ee35fb` |
| QQQ    | QQQUSDT\_IDX\_BIF  | `0x78b496759c048df0958c098b1a4eac1beec807345d4542ca42ae863ba2dc25e2` |
| SPY    | SPYUSDT\_IDX\_BIF  | `0x4ca7a0f98370609edd8996998ccffb8d7fed0364d0ab10c2af5b2abcd0a0722b` |

### Mark Feeds

| Symbol | Feed Name         | Feed ID                                                              |
| ------ | ----------------- | -------------------------------------------------------------------- |
| BTC    | BTCUSDCMARK       | `0x98848cd117152974f79fb357720f794415ab653bc2c2dd4548395dc2c4123440` |
| ETH    | ETHUSDCMARK       | `0xda569051437902cb45839186e4a76dcd2dae9af3bd3b2c586661d302a51f45cf` |
| BNB    | BNBUSDCMARK       | `0x64ebc686a344d4b7ab5cafefcf0058287a3333689e5ce89333f538401c2212e7` |
| SOL    | SOLUSDCMARK       | `0x0efff0986c5a94d5b4f3c71d06e9b8bdd7a8d835759742a55d906d1ae8bd12ff` |
| HYPE   | HYPEUSDCMARK      | `0x8ffc40e3f34342da2893de02ed411882d7d95bbad7781fad05a5de5b0f60ad12` |
| XRP    | XRPUSDCMARK       | `0xcec374c052bc1b19b227ff9d292442f2edbe0f75d873cc1ebf7b8fb341f22703` |
| TAO    | TAOUSDCMARK       | `0x93c1a558a68835531f29a4657d57e1bc3f675f41db97dc9239affc61e484d593` |
| ZEC    | ZECUSDCMARK       | `0x3c80aed5536c46cecf673f4ee9a7979db5b4cb9118316aab7f4b91f942aa7459` |
| NEAR   | NEARUSDCMARK      | `0x1c6479b04d0bfb05a7ea267a98e16b8ef5e6acc0aab3ba2f25aa67b624525f4b` |
| VVV    | VVVUSDCMARK       | `0xf7858d7fa6e4a7e24369e22f5718439a7b0e514986a99869f1e1dd83337ec908` |
| LIT    | LITUSDCMARK       | `0x7f8f9dabb2220b6d771e19eed60d7691025e54a2dda48345939680f38bda231d` |
| DOGE   | DOGEUSDCMARK      | `0x5ddb4ebe2565a5b48d4c55e80be1ed034725b8f2bde3bc5adfea96dfb2cac55b` |
| AERO   | AEROUSDCMARK      | `0xbf6bc15e384166b6ca6ff732970419766c6e5a0c660ae001e411fafb55978bcb` |
| AAVE   | AAVEUSDCMARK      | `0x8344805f4d9d519a0869044c5da98083e50c318527e67c6ccadd7a3143f360d1` |
| PUMP   | PUMPUSDCMARK      | `0xd25f81cd11f01aed465dbbf2107f098454c9d002bf73a9551d47e3943957f3c8` |
| XAU    | XAUUSDT\_MK\_BIF  | `0xaaccfecff6fea32997fb028ac7fa1a981386b2b92a627bba9c056e394cccfbd0` |
| XAG    | XAGUSDT\_MK\_BIF  | `0x28d6a12ff53bf4188453d215aa70e9a5ec0d64538deacf732bd76b6e55383638` |
| CL     | CLUSDT\_MK\_BIF   | `0x7dc69553bafff9bfc27a450778753368ebea4ded9ca0b72e4a94c8bb092b9372` |
| BZ     | BZUSDT\_MK\_BIF   | `0x28f797ec39d624ca8360bff6fd792e7efb89aa2cca4de6babaf319ab724c6e09` |
| SNDK   | SNDKUSDT\_MK\_BIF | `0x0514603e013d8356abab320cd52d26f70f204cdd1f6b471249943a29c445efd2` |
| SPCX   | SPCXUSDT\_MK\_BIF | `0x05339477e96f375fd3d07473a2d91d54bcbcea88464490f00117ce78766085e2` |
| DRAM   | DRAMUSDT\_MK\_BIF | `0x7cdabd58fb5937f7948508191652effc29b2bd27359be46dab28cc966ede3ca3` |
| MU     | MUUSDT\_MK\_BIF   | `0xc1a6c898727662681b437b5b4210e5ea310c83eca83404413f14705675da8da7` |
| QQQ    | QQQUSDT\_MK\_BIF  | `0x394303f4cb565301ed2b6f0dd47a7250ce4f1d84cfccf2db8caf8cd9691984fa` |
| SPY    | SPYUSDT\_MK\_BIF  | `0x7c9147b3725023d5bfae5c55118fe1aadbb3d12249daabd0b2a9776fd1d14d2f` |

***

## RWA Trading

* **Trading hours:** RWA markets trade **24/7** on RISEx, including nights, weekends, and holidays when the underlying market is closed. There is no price freeze or trading pause (unless the price is stale). However, we expect lower liquidity and activity during the underlying's off-hours, since the oracle continues sourcing from Stork but real-world market-making thins out.
* **Interest rate & dampener:** RWA markets carry `0%` base interest and a `5 bps` interest rate dampener by default, versus `0.01%` interest and no dampener for crypto markets. See [Funding Payments](/docs/risex/trading/funding#interest-rate-dampener) for how the dampener shapes the funding rate, and [Market Specifications](/docs/risex/trading/markets) for per-market values.
