Financial markets produce valuable data like stock prices, currency exchange rates, and commodity prices. This data powers critical financial applications and informs decisions that move billions of dollars. However, high-quality financial data is often only available to institutions like banks and hedge funds. The average person can’t reliably access the data.

Pyth aims to change this status quo by making accurate financial data openly available on blockchains. It is a protocol that coordinates various participants to publish frequent price updates on-chain. These price feeds can then power blockchain-based decentralized finance (DeFi) applications.

For example, a lending protocol may want to use Pyth’s price feed for Tesla stock to manage loans collateralized by TSLA tokens. Or a decentralized exchange can use Pyth’s ETH/USD price to value trades on their platform.

Pyth brings first-party data from financial institutions on-chain. It aggregates this data in a manipulation-resistant way to produce robust real-time price feeds. The openness of blockchains allows anyone to leverage this financial data. This moves us toward the vision of an open, transparent, and fair financial system.

The protocol uses economic incentives powered by its native token, PYTH, to attract publishers and maintain high data quality. This beginner’s guide will explain how Pyth works and the key mechanisms that coordinate all its participants.


Quick Facts

CategoryInformation
GoalMake accurate financial data accessible on blockchains
ParticipantsPublishers – Provide price data, Consumers – Use price data, Delegators – Help secure data
Key MechanismsData Staking – Hedging for consumers, Reward Distribution – Incentives for publishers, Price Aggregation – Robust combined feed
Attacks ResistedPrice Manipulation, Reward Exploitation, False Payout Claims
Native TokenPYTH coordinates participants through cryptoeconomic incentives
Current StateLive on Solana, aiming to be a core DeFi primitive
Future RoadmapMulti-chain expansion, governance decentralization, new data types

Keypoints

  • Pyth is a protocol to make financial market data accessible on blockchains. It aggregates price data from publishers and makes it available to consumers.
  • The protocol has mechanisms like data staking and reward distribution to align incentives between publishers, consumers, and delegators.
  • Data staking allows consumers to pay fees to hedge against inaccurate data. Delegators can stake tokens to back products and earn a share of fees.
  • The reward distribution mechanism preferentially rewards publishers that provide more accurate and predictive price feeds.
  • The protocol is designed to be robust against attacks like price manipulation by limiting influence of individual publishers.

Participants

There are three primary categories of participants that power the Pyth network:

Publishers

These are entities that publish frequent price updates to Pyth for various financial assets. For example, a cryptocurrency exchange publishing the BTC/USD price. Or an equities trading firm publishing Tesla’s stock price.

Publishers are incentivized to provide accurate and timely data. They earn token rewards proportional to the quality of their price feeds. They also earn a share of data fees paid by consumers.

Consumers

These are the users of the price data. They incorporate Pyth’s price feeds into their blockchain applications in return for fees.

For example, a lending protocol that allows borrowing against Tesla stock. Or a decentralized exchange that uses Pyth’s forex feeds to settle trades.

Consumers pay data fees to hedge against the risk of inaccurate data. These fees go to delegators and publishers.

Delegators

Delegators stake PYTH tokens to back Pyth’s data feeds. In return, they earn a share of data fees paid by consumers.

They play an important role in ensuring data quality. Their stakes are slashed if there are persistent data errors. Delegators are thus incentivized to ensure at least one honest publisher exists for each data feed.

These participants are coordinated through Pyth’s incentive design to produce a reliable and manipulation-resistant source of on-chain financial data.


Key Mechanisms

There are three main mechanisms that coordinate the various participants in Pyth and align their incentives:

Data staking

This allows Pyth data consumers to pay fees to hedge against inaccurate data. The fees go into a pool. Special participants called delegators can stake PYTH tokens to “back” Pyth data feeds. They earn a share of the fee pool in return. If there is an inaccuracy, delegators may lose part of their stake.

This gives data consumers protection against bad data. It incentivizes delegators to ensure data quality. Their stakes are slashed if there are persistent errors.

Reward distribution

This mechanism tracks the quality of price feeds from each publisher. Publishers that provide more accurate and timely data earn a bigger portion of the rewards. Publishers earn tokens from another slice of the data fee pool.

This incentivizes top financial firms to share their proprietary data as Pyth publishers. The better their data quality, the bigger their reward share.

Price aggregation

The prices published by various Pyth publishers are aggregated into a single robust price feed using a weighted median algorithm. This limits the influence of any one publisher on the price.

The aggregated price feeds power various DeFi applications. The aggregation method protects the feeds against deliberate manipulation attempts.

These three mechanisms work together to build a reliable and sustainable source of blockchain financial data.


Attacks and Robustness

Decentralized systems like Pyth have to be designed to resist various attacks. Here are some common attacks and how Pyth handles them:

Price Manipulation

Adversaries could try to become publishers and push the price feeds in a favorable direction.

Pyth resists this through the price aggregation algorithm. No single publisher has enough influence to significantly move the price. Manipulation attempts get nullified at aggregation.

Exploiting Rewards

Bad actors could publish random or stale prices to game the reward system.

Pyth counters this by rewarding predictions of price changes rather than agreement. This requires real-time data and predictions. Past prices contain no predictive signal.

False Payout Claims

Participants could file false claims about data inaccuracy to trigger undeserved payouts.

Pyth verifies claims through a commit-reveal scheme with decentralized judges. Tokens holders have social pressure to not ratify bogus claims.

Together, these mechanisms make attacks very expensive. Rational adversaries have no incentive to attack rather than participate properly. This is how Pyth sustains reliable financial data feeds.

The system parameters like staking levels and reward splits can also be tuned through governance to balance robustness versus cost. This built-in adaptability helps Pyth react to new types of attacks over time.


Conclusion

Access to accurate and timely financial data is key to an efficient financial system. However, quality data is often siloed and inaccessible to everyday investors and applications.

Pyth opens up valuable first-party data to on-chain smart contracts through a decentralized network of publishers, delegators, and public blockchain records. This brings increased transparency and fairness to finance.

The protocol’s incentive schemes make it sustainable by rewarding honest behavior and punishing deception. The aggregated price feeds resist manipulation and reflect true market prices.

While still in initial phases, Pyth promises to be a fundamental primitive powering the next generation of decentralized finance. Its design tries to balance the idealism of blockchains with the realities of adversarial environments.

Oracles are easy to underestimate but they enable so many more complex financial applications. Pyth is positioning itself to be the gold standard for decentralized financial data – an essential cog to drive mainstream DeFi adoption.

With continued refinement guided by its community, Pyth can fulfill the vision of open and reliable real-time data infrastructure for on-chain ecosystems.

The post What is Pyth Network? Beginner’s Guide to This Oracle Protocol appeared first on Blockonomi.