# Price Feed & RMM

### <mark style="color:purple;">Introduction</mark>

Our pricing infrastructure is underpinned by a **hybrid off-chain and on-chain architecture**, combining **price publishers** with our proprietary **Reflective Market Maker (RMM)** system. This ensures accurate real-time pricing and efficient liquidity provision.

1. <mark style="color:purple;">Price Publishers</mark>
   * Price publishers continuously **aggregate chart and orderbook data** from leading centralized exchanges (CEXs) such as Binance, utilizing WebSocket streams and REST APIs for low-latency data retrieval.
   * The collected data is **normalized and validated off-chain** to ensure consistency, with updates propagated at **sub-second intervals** to maintain alignment with global market conditions.
2. <mark style="color:purple;">Reflective Market Maker (RMM)</mark>
   * The **RMM system mirrors CEX orderbooks on-chain**, leveraging aggregated data to replicate depth and pricing. This mirroring process can be described as the following mapping function:

$$
M: O\_{CEX} \rightarrow O\_{Onchain}
$$

where:

* ( O\_{CEX} ) represents the CEX orderbook,
* ( O\_{Onchain} ) is our on-chain representation.
* **On-chain, RMM executes automatic market-making calculations** to adjust liquidity and depth, using algorithms such as **constant product market makers (CPMM)** or dynamic pricing models. Liquidity provision is determined by:

$$
L = k \cdot P \cdot D
$$

where:

* ( L ) is liquidity,
* ( P ) is price,
* ( D ) is depth,
* ( k ) is a constant determined by the mirrored orderbook.
* These calculations are **implemented in smart contracts**, ensuring **transparency and trustlessness**, while **off-chain nodes handle computational load** to maintain efficiency.

3. <mark style="color:purple;">Price Feed Generation</mark>

$$
P = \sum\_{i=1}^{n} w\_i \cdot P\_i
$$

where:&#x20;

* ( P\_i ) is the price from exchange,&#x20;
* ( i ), ( w\_i ) is the weight for that exchange (with ( \sum w\_i = 1 ) ),
* ( n ) is the number of CEXs,&#x20;

$$
w\_i = F(L\_i, V\_i, C\_i)
$$

where:

* ( w\_i ) is the weight,&#x20;
* ( L\_i ) is the function of liquidity,&#x20;
* ( V\_i ) is the volume,&#x20;
* ( C\_i ) is the credibility factor.

This ensures that exchanges with higher liquidity, greater trading activity, and stronger trustworthiness exert more influence on the final price, optimizing both precision and stability in dynamic market conditions.

### <mark style="color:purple;">Key Benefits</mark>

* **Real-Time Market Data**: Ensures pricing consistency with leading CEXs.
* **Deep Liquidity**: Mirrors CEX orderbook depth, reducing slippage.
* **Trustless Execution**: On-chain calculations ensure verifiable pricing.
* **Reduced Oracle Risks**: Eliminates reliance on traditional oracles, minimizing data manipulation and downtime risks.

By eliminating traditional oracle dependencies, this system provides developers with a **reliable price feed** for high-stakes trading applications. The **RMM’s on-chain execution** ensures that pricing data remains **immutable and verifiable**, enhancing trust for integrated decentralized applications.
