Price Oracle
Last updated
Last updated
Kai Finance integrates Pyth Network as our primary price oracle solution to ensure secure and accurate price feeds for all platform operations.
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.
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:
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.
Pyth's oracle program combines publishers' data to produce a single aggregate price and confidence interval.
Consumers read the price information produced by the oracle program.
Pyth's oracle program runs on . The prices constructed on Pythnet are transferred to reach consumers on these blockchains.
The critical component of the system is the that combines the data from each individual publisher. This program maintains a number of different 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 , 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.
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
You can learn more about Pyth from the and .