Liquid Stake with compassSOL for an 7.32% APY from staking, MEV + fees

Enjoy the freedom of liquid staking in Solana Defi while delegating your stake to the high performance Solana Compass validator. Stake or unstake at any time here, or with a Jupiter swap.

Benefit from our high staking returns and over 2 years experience operating a Solana validator, and receive additional yield from priority fees + MEV tips

Earn 6.7% APY staking with Solana Compass

Help decentralize and secure the Solana network delegating your stake to us and earn an impressive 6.7% APY yield on your SOL, while supporting us to create new guides and tools. Learn more

Stake your SOL

  1. Click to connect your wallet
  2. Enter the amount you wish to stake
  3. Kick back and enjoy your returns
  4. Unstake from your wallet or our staking dashboard

Earn 6.7% APY staking with Solana Compass

Help decentralize and secure the Solana network delegating your stake to us and earn an impressive 6.7% APY yield on your SOL, while supporting us to create new guides and tools.

Learn more

Validated | How Pyth Is Changing the Oracle Game w/ Jayant Krishnamurthy

By Validated

Published on 2023-09-19

Discover how Pyth Network is transforming the oracle landscape with its innovative approach to bringing real-world data onto blockchains, offering high-frequency and low-latency solutions across multiple chains.

The notes below are AI generated and may not be 100% accurate. Watch the video to be sure!

Pyth Network: Revolutionizing the Oracle Landscape

In the ever-evolving world of blockchain technology and decentralized finance (DeFi), the need for reliable, real-time data has become increasingly critical. Enter Pyth Network, a groundbreaking oracle solution that's changing the game by providing high-frequency, low-latency data across multiple blockchain networks. In this in-depth exploration, we'll dive into the innovative approach Pyth is taking to solve long-standing challenges in the oracle space and how it's positioning itself as a leader in the provision of on-chain data.

What are Oracles, and Why is Pyth Different?

Oracles play a crucial role in the blockchain ecosystem by bringing real-world data onto the blockchain. This is essential because smart contracts, by default, have no way to access external information. Pyth Network has emerged as a response to the limitations of traditional oracle designs, offering a unique approach that sets it apart from its predecessors.

Jayant Krishnamurthy, a key figure in the development of Pyth, explains the fundamental difference: "Pyth is a first-party oracle where the owners of the data are actually the ones who report that data to the blockchain." This is in contrast to third-party oracles that typically scrape data from public sources on the web.

Pyth's Data Acquisition Model

The core of Pyth's innovation lies in its data acquisition model. Unlike other oracles that rely on web scraping or public data sources, Pyth has built a network of over 80 data providers. These include some of the biggest names in traditional finance and the crypto world, such as Virtu, Tower, Coinbase, and Binance.

This approach gives Pyth access to data that other oracles simply can't obtain. Krishnamurthy highlights a prime example: "Pyth has real-time US equity prices, which like you can't really get anywhere else." This level of data access is a game-changer for DeFi applications that require high-quality, real-time financial market data.

Why are Institutions Interested in Working with Pyth?

One of the most intriguing aspects of Pyth is the collaboration between traditionally competitive financial institutions. Krishnamurthy outlines two primary reasons for this unexpected cooperation:

  1. Stake in the network: "A big chunk of the Pyth tokens have basically been allocated as grants to data providers to kind of encourage them to provide this data."

  2. Monetization of a "found resource": For many firms, particularly high-frequency trading (HFT) companies, the data they possess is not something they're currently monetizing. Pyth offers an opportunity to derive value from this untapped resource.

Additionally, many firms see participation in Pyth as a way to dip their toes into the crypto space without the full compliance obligations that come with direct trading.

How Blended Sources of Data Get Represented by a Single Number

Pyth's approach to data aggregation is both sophisticated and robust. Rather than relying on a single source, Pyth blends data from multiple providers. Krishnamurthy explains the rationale: "If you have a single source of data, uh, you know, it's much easier to manipulate like the price on a single exchange or something like that. Or there could be, you know, reliability issues."

The process works as follows:

  1. Data providers report prices to the blockchain continuously by sending transactions.
  2. A program running on the blockchain implements an algorithm that robustly combines the prices.
  3. The algorithm ensures that no single data provider or small group can significantly move the price by themselves.

This design enhances the security and reliability of the oracle, making it much harder to manipulate or attack.

How Different Data Contributors to Pyth are Weighted

Currently, Pyth employs a flat weighting system for its data contributors. While there have been discussions about implementing a variable system, the team has found it challenging to determine the right approach to weighting without giving any single entity too much influence.

Krishnamurthy draws an interesting parallel: "The Oracle problem is very similar to like the multi-sig governance problem where it's hard to figure out what a reliable way to weight the various actions of various folks are in an ecosystem."

Confidence Intervals: A Unique Feature of Pyth

One of Pyth's most innovative features is the inclusion of confidence intervals with each price feed. Krishnamurthy explains the reasoning behind this: "Any given asset actually trades at different prices at different venues around the world and an even point in time. So it's not realistic to say that there's a single price for the ask, right? There's really a probability distribution of prices."

These confidence intervals provide downstream protocols with a way to incorporate uncertainty into their operations. For example, a lending protocol might decide not to liquidate a user unless the upper bound of the confidence interval is below the liquidation price.

Defining High Frequency and Low Latency in the Context of Oracles

Pyth distinguishes itself by optimizing for both high frequency and low latency. Krishnamurthy clarifies the difference:

  • Latency: How long it takes for a price to go from the original source to the users of the protocol.
  • Frequency: How many updates are provided per second.

For Pyth, the end-to-end latency is about two to three seconds, with updates occurring every 400 milliseconds. This is significantly faster than most other oracles in the market, which might update only once every 10 minutes or so.

How Pyth's Architecture Achieves Speed

Pyth's impressive speed is largely due to its foundation on the Solana blockchain. Krishnamurthy notes, "Solana is a blockchain that's optimized for latency and, you know, transactions per second." This technological base allows Pyth to achieve performance levels that would be difficult or impossible on other chains.

However, to expand beyond Solana and become a multi-chain oracle, Pyth developed an innovative solution: Pythnet. This is a separate Solana network used to combine prices and deliver them to other blockchains.

The Move from the Solana L1 to Pythnet

The transition from operating on Solana's main network to Pythnet was driven by the need to serve multiple blockchain ecosystems efficiently. Krishnamurthy explains, "We kind of had this idea that we wanted to be multi-chain. And our initial way of doing this was thinking, okay, we'll just do it on Solana and we'll bridge it over to other chains."

However, this approach faced resistance from developers on other chains who were uncomfortable with the idea of their Layer 1 depending on another Layer 1. The solution was to create Pythnet, a permissioned Solana-based network run by the data providers themselves.

Modifying Validators to Run Pythnet

To optimize Pythnet for oracle operations, the team made modifications to the Solana validator software. One significant change was the implementation of a Merkle tree for all Pyth prices on every slot. Krishnamurthy explains, "We put this into the validator because, uh, you want something that's kind of able to look at the global state of the blockchain, which is like hard to do with individual transactions."

This modification allows Pyth to send the roots of the Merkle tree to other chains using Wormhole, a cross-chain messaging protocol. This approach is more efficient and cheaper on target chains, reducing costs by 30-90% depending on the number of prices being updated.

Pyth's Off-Chain Activity

While Pyth strives to maintain the security and verifiability guarantees of on-chain systems, it also leverages off-chain components to enhance performance. Krishnamurthy describes Pyth as a "pull oracle," where off-chain data payloads are generated and made available for users to pull onto the blockchain when needed.

This design offers several advantages:

  1. It's more efficient than continuously updating prices on-chain.
  2. It allows for higher update frequencies without incurring excessive costs.
  3. It maintains a full audit trail for each data payload.

The Off-Chain Components of DeFi 2.0 More Broadly

The discussion of Pyth's architecture touches on a broader trend in DeFi towards hybrid on-chain/off-chain models. Krishnamurthy notes, "I think we're going to see more, um, protocols being built at this, like, with this kind of creative combination of off-chain and on-chain."

This trend is driven by the need to balance the security and transparency of blockchain technology with the performance requirements of real-world financial applications. Pyth's approach demonstrates how off-chain components can be integrated without compromising the core principles of decentralization and verifiability.

Initiating Calls for Price Updates

In Pyth's pull oracle model, users are responsible for initiating price updates on-chain. Krishnamurthy explains the process: "Pyth has a contract that lives on, uh, we're on 30 different blockchains right now. So there's a contract that lives on those blockchains. And that contract has a function basically, right? That you can call where you give it a binary data payload and it takes that data payload and it kind of verifies it."

This approach allows for more efficient use of blockchain resources, as prices are only updated when they're needed, rather than constantly being pushed to the chain.

How Pyth Interacts with the L2 Ecosystem

Pyth treats each Layer 2 (L2) solution as an independent blockchain. This uniform approach simplifies the process of extending Pyth to new chains. Krishnamurthy explains, "Because we're kind of generating all the prices on Pythnet, there's sort of one, there's one piece of kind of technical infrastructure, right? That is like taking all the prices from data providers, combining them, you know, signing them, making sure that you got these verifiable payloads."

This design allows Pyth to easily adapt to new L2s and other blockchain ecosystems without needing to develop specific infrastructure for each one.

How the Pull Oracle Model is Key to Pyth's Sustainability

Pyth's pull oracle model is not just a technical innovation; it's also key to the project's long-term sustainability. Krishnamurthy reveals, "With the pull work, all every time someone puts one of these price payloads onto the blockchain, they actually pay Pyth the small fee."

This monetization model ensures that as usage grows, Pyth can generate meaningful revenue to support its operations and development. It's a stark contrast to push oracle models, which struggle to monetize their services effectively.

How Will Oracles Maintain Their Place in the Market Over the Next Few Years?

Looking to the future, Krishnamurthy sees a continued strong role for specialized oracle services like Pyth. He points out that in traditional finance, market data fees tend to account for about 20% of the revenue of big exchanges. This suggests that there's significant value placed on high-quality, real-time financial data.

Pyth is particularly focused on what Krishnamurthy calls the "proprietary multi-source case" of data. This includes financial market data, which is arguably the most valuable type of data in this category. By specializing in this niche, Pyth aims to provide value that individual protocols would struggle to replicate on their own.

Learnings from Developing Pyth During the Bear Market

Developing and launching Pyth during a bear market has provided valuable insights and experiences. Krishnamurthy highlights several key learnings:

  1. Resilience in volatility: Pyth's infrastructure has proven robust during periods of high market volatility and price discrepancies across exchanges.

  2. Increased interest in on-chain trading: There's been a noticeable trend towards on-chain trading solutions, which aligns well with Pyth's low latency, high-frequency offerings.

  3. Blockchain ecosystem differences: Expanding to multiple chains has revealed significant differences in infrastructure, cost structures, and developer ecosystems across different blockchains.

  4. Security and reliability focus: The high stakes nature of DeFi has underscored the critical importance of building extremely secure and reliable software.

Krishnamurthy reflects, "One of the things that's definitely been interesting for me is like, really internalized and like what it takes to build software to like that level of quality and that like security and reliability standard."

The Future of Oracles and DeFi

As DeFi continues to evolve and mature, the role of oracles like Pyth is likely to become even more crucial. The trend towards real-world asset tokenization and the increasing sophistication of on-chain financial products will demand ever more reliable, real-time data sources.

Pyth's innovative approach, combining high-quality data from reputable sources with a flexible, efficient delivery model, positions it well to meet these emerging needs. As the project continues to expand its reach across different blockchain ecosystems and data types, it has the potential to become a cornerstone of the DeFi infrastructure.

In conclusion, Pyth Network represents a significant leap forward in oracle technology. By addressing long-standing challenges in data quality, latency, and cost-effectiveness, Pyth is not just keeping pace with the evolving DeFi landscape – it's helping to shape its future. As the boundaries between traditional finance and DeFi continue to blur, solutions like Pyth will play a pivotal role in bridging these worlds and unlocking new possibilities for decentralized applications.

Facts + Figures

  • Pyth Network has over 80 data providers, including major traditional finance firms and crypto exchanges like Virtu, Tower, Coinbase, and Binance.

  • Pyth offers real-time US equity prices, which are not readily available through other oracle services.

  • The end-to-end latency for Pyth's price updates is about 2-3 seconds, with updates occurring every 400 milliseconds.

  • Pyth is currently live on 30 different blockchains.

  • Pyth's pull oracle model can reduce costs on target chains by 30-90% compared to traditional push models, depending on the number of prices being updated.

  • In traditional finance, market data fees account for about 20% of the revenue of big exchanges, indicating the high value placed on financial data.

  • Pyth originally launched on Solana but has since expanded to support multiple blockchain ecosystems.

  • Pythnet is a separate Solana-based network created specifically for Pyth's oracle operations.

  • Pyth implements a Merkle tree for all prices on every slot in Pythnet, optimizing for efficiency in cross-chain data delivery.

  • The project has allocated a significant portion of Pyth tokens as grants to incentivize data providers.

  • Pyth uses a flat weighting system for data contributors to ensure no single entity has too much influence.

  • Each price feed from Pyth includes confidence intervals, providing additional context about price uncertainty.

  • Pyth's monetization model charges a small fee each time a price payload is put onto a blockchain.

  • The project has weathered significant market volatility, including events like the USDC de-peg earlier in the year.

  • Pyth has observed an increasing trend towards on-chain trading solutions during the bear market.

Questions Answered

What is Pyth Network?

Pyth Network is a first-party oracle that brings real-world data onto blockchains. Unlike traditional oracles that scrape data from public sources, Pyth directly sources data from over 80 providers, including major financial institutions and crypto exchanges. This allows Pyth to offer high-quality, real-time data that is not available through other oracle services, such as real-time US equity prices.

How does Pyth differ from other oracles?

Pyth differentiates itself through its first-party data model and focus on high-frequency, low-latency updates. While many oracles rely on web scraping or public data, Pyth sources data directly from the owners of that data. It also provides updates every 400 milliseconds with an end-to-end latency of 2-3 seconds, which is significantly faster than most other oracles. Additionally, Pyth includes confidence intervals with each price feed, offering users more context about price uncertainty.

What is Pythnet and why was it created?

Pythnet is a separate Solana-based network created specifically for Pyth's oracle operations. It was developed to allow Pyth to serve multiple blockchain ecosystems efficiently without requiring other chains to depend directly on Solana's main network. Pythnet is run by Pyth's data providers and includes custom modifications to the Solana validator software to optimize it for oracle operations, such as implementing a Merkle tree for all prices on every slot.

How does Pyth ensure the accuracy of its data?

Pyth uses a blended source model, combining data from multiple providers to ensure accuracy and robustness. The system implements an algorithm that combines prices from different sources in a way that no single provider or small group can significantly influence the price. This approach, coupled with the high-quality sources of the data, helps to prevent manipulation and ensure reliability even in volatile market conditions.

What is the "pull oracle" model and how does it benefit Pyth?

The pull oracle model is Pyth's approach to making data available on different blockchains. Instead of continuously pushing updates on-chain, Pyth generates off-chain data payloads that users can pull onto the blockchain when needed. This model is more efficient and cost-effective, allowing for higher update frequencies without incurring excessive costs. It also provides a clear path for monetization, as users pay a small fee each time they pull data onto the chain.

How is Pyth addressing the challenges of cross-chain compatibility?

Pyth addresses cross-chain compatibility through its use of Pythnet and the pull oracle model. By generating price data on Pythnet and using Merkle trees to efficiently represent this data, Pyth can easily deliver price information to any compatible blockchain. The project treats each blockchain, including Layer 2 solutions, as independent, which simplifies the process of extending support to new chains. This approach has allowed Pyth to expand to over 30 different blockchains.

What has Pyth learned from operating during a bear market?

Operating during a bear market has provided Pyth with several valuable insights. The project has demonstrated resilience during periods of high market volatility, validating its robust infrastructure. Pyth has also observed an increased interest in on-chain trading solutions, which aligns well with its low-latency, high-frequency offerings. The experience has underscored the critical importance of building extremely secure and reliable software for DeFi applications, where significant amounts of value are at stake.

How does Pyth monetize its services?

Pyth monetizes its services through its pull oracle model. Every time a user puts a price payload onto a blockchain, they pay Pyth a small fee. This approach ensures that as usage of Pyth grows, the project can generate meaningful revenue to support its operations and development. The fee is currently set at a placeholder value but can be adjusted through governance in the future.

What role does Pyth see for oracles in the future of DeFi?

Pyth sees a continued strong role for specialized oracle services in the future of DeFi. As the industry moves towards more complex financial products and real-world asset tokenization, the demand for high-quality, real-time data is likely to increase. Pyth is particularly focused on providing proprietary, multi-source data, which it believes will be crucial for advanced DeFi applications. The project aims to become a cornerstone of DeFi infrastructure by bridging traditional finance data with blockchain applications.

How has expanding to multiple chains influenced Pyth's development?

Expanding to multiple chains has provided Pyth with valuable insights into the differences between blockchain ecosystems. The team has observed significant variations in infrastructure, cost structures, and developer ecosystems across different blockchains. This experience has informed Pyth's approach to cross-chain compatibility and highlighted the unique strengths of its original base on Solana, particularly in terms of speed and cost-effectiveness. The multi-chain expansion has also driven innovations in Pyth's architecture, such as the development of Pythnet and the pull oracle model.

Related Content

How Pyth Propagates Financial Data At The Speed of Light | Mike Cahill

Discover how Pyth Network is transforming the oracle landscape, bringing real-time financial data to blockchain with unparalleled speed and accuracy.

Bonkbot & Memecoin Trading On Telegram with Karol

Discover how Bonkbot is transforming Solana's memecoin landscape with its innovative Telegram trading interface, offering unparalleled speed and accessibility for traders.

Level Up. Go Crankless. w/ Jarry Xiao (Ellipsis Labs)

Discover how Phoenix is transforming DeFi with its innovative crankless order book design, offering unparalleled capital efficiency and market maker benefits on Solana.

Kivo: A New Social Experience in Solana

Discover how Kivo is transforming the crypto experience with its innovative social trading platform built on Solana, designed to make buying, selling, and staking cryptocurrencies more accessible and fun for retail users.

Meet DeFi 2.0 ft. Timeswap

Discover how Timeswap is transforming DeFi with its innovative oracle-less lending and borrowing protocol, offering a new paradigm for decentralized finance.

Bartosz On Building A Tamper-Proof CEX - Cube Exchange

Discover how Cube Exchange is transforming the centralized exchange landscape with innovative MPC wallets, offering unparalleled security and user control in the wake of the FTX collapse.

The Case for Onchain Options Trading w/ Lev & Serge from DeVol

Discover how DeVol Network is leveraging Solana's speed and efficiency to create a fully on-chain options trading platform, offering fairness and innovation in the DeFi space.

Wtf is StakeNet with Architect Evan | ep. 18

Discover how Jito's StakeNet is transforming Liquid Staking Tokens on Solana, enhancing decentralization and transparency in validator selection and stake delegation.

Unlocking DeFi With Infinex | Kain Warwick

Discover how Infinex is transforming DeFi with improved UX, cross-chain integration, and innovative token distribution models on Solana and beyond.

Blockchain gaming with walk-to-earn exploration (feat. Albert, co-founder of Genopets)

Discover how Genopets is transforming mobile gaming with its innovative walk-to-earn model and AI-driven exploration features, bringing blockchain gaming to the mainstream.

Web3 Domains on Solana with AllDomains - Solfate Podcast #52

Discover how AllDomains is transforming the domain landscape on Solana, offering innovative solutions like tokenized web2 domains and emoji domains.

How Quai Network Is Reinventing Proof-Of-Work | Alan Orwick (Quai Network)

Discover how Quai Network is reinventing proof-of-work with innovative sharding, energy-based tokens, and scalable blockchain technology to compete with modern proof-of-stake networks.

Powering Solana's Onchain Economy | Garrett Harper & Stepan Simkin

Discover how Squads Protocol is transforming Solana's ecosystem with innovative smart account solutions, enhancing security and user experience for both enterprises and consumers.

Audius: Building Spotify On Chain | Ray Jacobson (Audius)

Discover how Audius is transforming the music industry with decentralized streaming, empowering artists, and creating new monetization opportunities.

Validated | Can DePIN Build a Better Map Than Google?

Explore how HiveMapper is challenging Google Maps with blockchain technology and decentralized mapping, offering fresher data and fair rewards for contributors.