# Pyth Network Integration

### What is the Pyth Network?

The [Pyth Network](https://pyth.network/) is a specialized oracle solution for decentralized finance (DeFi) applications on blockchains. It provides high-fidelity financial data, such as asset prices, broadcasted in real-time and sourced from a decentralized network of contributors. Parifi integrates Pyth Network's data feeds to enhance its trading algorithms and offer accurate, up-to-the-second pricing for its perpetual contracts.

### Responsibilities of the Pyth Oracle within Parifi

* **Real-time Price Feeds:** The Pyth Network delivers rapid price updates that Parifi utilizes to adjust its liquidity curves and pricing algorithms dynamically.
* **Market Data Verification:** Pyth’s data assists in the real-time verification process during trade execution to prevent slippage and protect against front-running.
* **Enhanced Risk Management:** The integration with Pyth Network allows Parifi to implement an additional layer of security for price referencing, which is vital for the platform's adaptive risk management strategies.

### How does Parifi utilize the Pyth Network's oracles?

Parifi leverages the Pyth Network's oracle data in several ways:

* **Adaptive Pricing:** By using Pyth's real-time data, Parifi’s liquidity curves offer accurate and fair prices, adjusted according to market liquidity and volatility.
* **Order Execution:** Each trade is confirmed against the latest market data, ensuring that traders get the most current prices at execution time.
* **EMA Integration:** Parifi uses Pyth’s exponentially weighted moving average (EMA) as a secondary check for price verification, ensuring trades are executed within predefined price deviation limits.

### Parifi Oracle Contracts with Pyth Network

* **Price Feed Contract:** This contract is the on-chain component where the Pyth Network price feeds are directly utilized.
* **Order Manager Contract:** This contract manages the order creation and execution, utilizing the Pyth Network data for price verification.


---

# Agent Instructions: 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://docs.parifi.org/introduction/the-parifi-protocol/pyth-network-integration.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.
