> For the complete documentation index, see [llms.txt](https://mune-2.gitbook.io/mune/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mune-2.gitbook.io/mune/features/pricing-oracles.md).

# Pricing (Oracles)

### Oracle Architecture

Oracles play a vital role in a decentralized exchange (DEX) by enabling MUNE’s on-chain contracts to access external price data (e.g., spot and perpetual market prices) in real-time. MUNE integrates with Orderly Network’s oracle infrastructure, which is optimized for low-latency updates and high reliability across supported market pairs.

Orderly’s oracle system derives prices from a carefully selected set of centralized exchanges and calculates an index price through a Time-Weighted Average Price (TWAP) mechanism, ensuring robust and manipulation-resistant pricing.

#### Key Oracle Features:

* **Low Latency** – Updates are frequent and reflect real market activity.
* **Redundancy** – Multiple sources prevent reliance on any single venue.
* **Resilience** – Designed to handle volatility and avoid stale data.
* **Precision** – Indexes use volume-weighted average pricing (VWAP) to accurately reflect global liquidity.

***

#### Price Types on MUNE via Orderly

1. **Spot Oracle Price**\
   Index price derived from exchanges like Binance, Coinbase Pro, and Kraken.\
   This price is TWAP-calculated and used as the primary reference for liquidations.
2. **Perpetual Index Price**\
   A volume-weighted average of perpetual contract prices across major exchanges such as Binance, OKX, and ByBit.\
   Prices are converted from USDT to USD using volume-weighted averages from USDC-USDT and BUSD-USDT spot markets.
3. **Orderbook Mark Price**\
   A TWAP of the mid-price on MUNE’s own orderbook.\
   Used in funding rate calculations and displayed as the “mark price” on the front end.

***

#### Oracle Usage in MUNE

* **Liquidation Calculations**\
  MUNE uses both the Spot Oracle Price and the Perpetual Index Price to determine trader account health and trigger liquidations when necessary.
* **Funding Rates**\
  Calculated using a TWAP of the Orderbook Mark Price and the Spot Oracle Price.\
  This mechanism aligns perpetual contract pricing with spot markets and ensures fair funding flows between long and short positions.
* **Redundancy Against Depegging**\
  An independent oracle feed for USDC is used to maintain accurate account valuation even in the event of a USDC depeg.\
  MUNE always displays prices quoted in USDC, not USD, and makes no assumption that 1 USDC = 1 USD.

***

Unlike purely on-chain oracle systems that suffer from infrequent updates due to gas constraints, Orderly’s hybrid oracle model provides high-frequency, cost-efficient, and secure price feeds. This enables MUNE to maintain CEX-grade performance while remaining decentralized and transparent.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mune-2.gitbook.io/mune/features/pricing-oracles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
