> For the complete documentation index, see [llms.txt](https://docs.kai.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kai.finance/vaults/liquidity-provider-vaults/price-oracle.md).

# Price Oracle

Kai Finance integrates Pyth Network as our primary price oracle solution to ensure secure and accurate price feeds for all platform operations.

## Why Oracles Matter&#x20;

Using reliable price oracles like Pyth, rather than DEX prices, is crucial for platform security and user protection. DEX prices can be easily manipulated through tactics like flash loans or low liquidity pools, potentially leading to exploits and losses. For example, an attacker could temporarily manipulate a DEX price to create artificial borrowing power or trigger unfair liquidations. Pyth's oracle system prevents this by aggregating prices from numerous reputable sources off-chain, making manipulation extremely difficult and costly. This is especially important for lending and borrowing platforms like Kai Finance, where accurate asset pricing directly impacts user collateral and platform stability.

## How Pyth Works

Pyth is a protocol that allows market participants to publish pricing information on-chain for others to use. The protocol is an interaction between three parties:

1. *Publishers* submit pricing information to Pyth's oracle program. Pyth has multiple data publishers for every product to improve the accuracy and robustness of the system.
2. Pyth's *oracle program* combines publishers' data to produce a single aggregate price and confidence interval.
3. *Consumers* read the price information produced by the oracle program.

Pyth's oracle program runs on [Pythnet](https://docs.pyth.network/price-feeds/how-pyth-works/pythnet). The prices constructed on Pythnet are transferred [cross-chain](https://docs.pyth.network/price-feeds/how-pyth-works/cross-chain) to reach consumers on these blockchains.

The critical component of the system is the [oracle program](https://docs.pyth.network/price-feeds/how-pyth-works/oracle-program) that combines the data from each individual publisher. This program maintains a number of different [SVM accounts](https://docs.pyth.network/price-feeds/pythnet-reference/account-structure) that list the products on Pyth and their current price data. Publishers publish their price and confidence by interacting with the oracle program on every slot. The program stores this information in its accounts. The first price update in a slot additionally triggers [price aggregation](https://docs.pyth.network/price-feeds/how-pyth-works/price-aggregation), which combines the price data from the previous slot into a single aggregate price and confidence interval. This aggregate price is written to these SVM accounts of Pythnet where it is available for transmission to other blockchains.

## Key Features

* First-party price providers with "skin in the game"
* Prices are weighted based on provider reputation
* Aggregates price data from 70+ major trading firms and exchanges
* Sub-second price update frequency
* Outlier prices are automatically filtered
* Confidence intervals protect against market manipulation

## Learn more

You can learn more about Pyth from the [website](https://pyth.network/) and [documentation](https://docs.pyth.network/).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.kai.finance/vaults/liquidity-provider-vaults/price-oracle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
