Difference between revisions of "Pyth Network"

Jump to navigation Jump to search
4,482 bytes added ,  12:15, 12 December 2022
History part added on Pythnet
(1. Formatted better the Example under the Claims Process Section 2. Changed a few capital N in Pyth Network to lower case as written in official blogs and other material)
(History part added on Pythnet)
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Pyth Network Logo.jpg|thumb|300x300px|Pyth Network]]
[[File:Pyth Network Logo V2.jpg|thumb|Pyth Network]]
 
The Pyth network is '''a first-party financial oracle network''' designed to publish continuous real-world data on-chain in a tamper-resistant, decentralized, and self-sustainable environment.
The Pyth network is '''a first-party financial oracle network''' designed to publish continuous real-world data on-chain in a tamper-resistant, decentralized, and self-sustainable environment.


The network incentivizes market participants — exchanges, market makers, and financial services providers — to share directly on-chain the price data collected as part of their existing operations. The network then aggregates this first-party price data (still on-chain) and makes it available for free to either on- or off-chain applications.<ref>https://pyth.network/whitepaper</ref> End-users of Pyth data can elect to pay data fees to gain protection against a potential oracle failure as well as attract additional publishers to make the network more robust. 
The network incentivizes market participants — exchanges, market makers, and financial services providers — to share directly on-chain the price data collected as part of their existing operations. The network then aggregates this first-party price data (still on-chain) and makes it available to either on- or off-chain applications.<ref>https://pyth.network/whitepaper</ref>  


==History==
==History==
Line 14: Line 15:
[https://pythnetwork.mypinata.cloud/ipfs/QmZyXccxUfhHjqHevkhWXKw5zWcnFj3NY4JvnrXbkeAEhw Whitepaper release]: January 18, 2022
[https://pythnetwork.mypinata.cloud/ipfs/QmZyXccxUfhHjqHevkhWXKw5zWcnFj3NY4JvnrXbkeAEhw Whitepaper release]: January 18, 2022


On April 7, 2021, Dave Olsen, the President and Chief Investment Officer of [[wikipedia:Jump_Trading|Jump Trading]], announced on [https://podcast.jumpcap.com/public/88/The-Jump-Off-Point-8c500774/b546fd6a The Jump Off Point podcast] that Jump Trading is “collaborating on a world oracle project called Pyth”.<ref>https://podcast.jumpcap.com/public/88/The-Jump-Off-Point-8c500774/b546fd6a</ref> Pyth then revealed its live devnet prices [https://pythnetwork.medium.com/bf6877f8ece3 in mid-May] and showcased its live streaming and sub-second price update capabilities. In June 2021, Pyth released its [https://pyth.network/developers/publishers/migrating_to_version_2 v2 upgrade] smart contract, improving its aggregation method and space for up to 32 data publishers for a single asset. Finally, on August 26, the Pyth network officially launched on the [[Solana]] [https://pythnetwork.medium.com/the-pyth-network-mainnet-a3d45d2c0f58 mainnet].  
On April 7, 2021, Dave Olsen, the President and Chief Investment Officer of [[wikipedia:Jump_Trading|Jump Trading]], announced on [https://podcast.jumpcap.com/public/88/The-Jump-Off-Point-8c500774/b546fd6a The Jump Off Point podcast] that Jump Trading is “collaborating on a world oracle project called Pyth”.<ref>https://podcast.jumpcap.com/public/88/The-Jump-Off-Point-8c500774/b546fd6a</ref> Pyth then revealed its live devnet prices [https://pythnetwork.medium.com/bf6877f8ece3 in mid-May] and showcased its live streaming and sub-second price update capabilities. On August 26, the Pyth network officially launched on the [[Solana]] [https://pythnetwork.medium.com/the-pyth-network-mainnet-a3d45d2c0f58 mainnet].  


Pyth finished 2021 with over $1B in Total Value Secured (TVS), and facilitated over $7B in trading (including perpetual and synthetics platforms), with 38 announced mainnet integration partners and 41 data publishers.<ref>https://pythnetwork.medium.com/pythiad-6-2021-in-review-2022-in-sight-5e1f4c1743cc</ref> Since then, Pyth TVS reached about $2B spread over 50 integrations and welcomed more than 15 new data publishers.<ref>https://pythnetwork.medium.com/pythiad-6-2021-in-review-2022-in-sight-5e1f4c1743cc</ref>  
Pyth finished 2021 with over $1B in Total Value Secured (TVS), and facilitated over $7B in trading (including perpetual and synthetics platforms), with 38 announced mainnet integration partners and 41 data publishers.<ref>https://pythnetwork.medium.com/pythiad-6-2021-in-review-2022-in-sight-5e1f4c1743cc</ref> Since then, Pyth TVS reached about $2B spread over 50 integrations and welcomed more than 15 new data publishers.<ref>https://pythnetwork.medium.com/pythiad-6-2021-in-review-2022-in-sight-5e1f4c1743cc</ref>  
Line 21: Line 22:


The Pyth network has also been involved in several public events within the Solana ecosystem and DeFi. Pyth was a sponsor for the [https://solana.com/solanaszn Solana Season Hackathon] (May 15-June 7, 2020) and the [https://serum-wormhole-hackathon.devpost.com/ Convergence - Serum x Wormhole Hackathon] (January 7-31, 2021). Pyth also held its first own [https://www.youtube.com/playlist?list=PLilwLeBwGuK6TE5QuMos8a8B9uOfS2cm1 workshop] in Chicago for developers looking to learn more about Pyth and building on top of it (January 17-21, 2022). Outside of DeFi, Pyth was a platinum sponsor at the 2022 [https://www.fia.org/events/international-futures-industry-conference?utm_source=FIAWeb&utm_medium=Top FIA Boca Conference] in Florida (March 15-17).
The Pyth network has also been involved in several public events within the Solana ecosystem and DeFi. Pyth was a sponsor for the [https://solana.com/solanaszn Solana Season Hackathon] (May 15-June 7, 2020) and the [https://serum-wormhole-hackathon.devpost.com/ Convergence - Serum x Wormhole Hackathon] (January 7-31, 2021). Pyth also held its first own [https://www.youtube.com/playlist?list=PLilwLeBwGuK6TE5QuMos8a8B9uOfS2cm1 workshop] in Chicago for developers looking to learn more about Pyth and building on top of it (January 17-21, 2022). Outside of DeFi, Pyth was a platinum sponsor at the 2022 [https://www.fia.org/events/international-futures-industry-conference?utm_source=FIAWeb&utm_medium=Top FIA Boca Conference] in Florida (March 15-17).
On August 1, 2022, the Pyth network [https://medium.com/@pythnetwork/introducing-pythnet-f54192c355c5 officially announced Pythnet], a network built on the Solana codebase that enables the Pyth network to aggregate first-party data at sub-second speeds and deliver pricing to other chains via the Wormhole cross-chain messaging protocol. Pythnet allows Pyth to take the next step in its evolution by adding new financial data and continuing to grow its network of high-quality first-party data providers. These additional high-fidelity feeds will be available on other chains, including Solana, via the Wormhole protocol.
Thanks to Pythnet, Pyth Network price feeds are now live on:
* Aptos
* Aurora
* BNB Chain
* Ethereum
* Optimism
* Solana
* and many more


==General Concepts==
==General Concepts==
Line 35: Line 48:


=== The Price of an Asset ===
=== The Price of an Asset ===
[[File:Pyth Feed Real-Time.png|thumb|Pyth Price and Confidence Interval]]Consider a single stock, say [[wikipedia:Tesla,_Inc.|TSLA]].  
[[File:Pyth Feed Real-Time.png|thumb|Pyth Price and Confidence Interval|404x404px]]Consider a single stock, say [[wikipedia:Tesla,_Inc.|TSLA]].  


“What is the price of TSLA?” is a seemingly simple question, but there are subtle complications.
“What is the price of TSLA?” is a seemingly simple question, but there are subtle complications.
Line 50: Line 63:


=== High-fidelity (HiFi) data ===
=== High-fidelity (HiFi) data ===
For innovations to accelerate and the whole DeFi ecosystem to mature, it requires high fidelity, time-sensitive, real-world data, which has historically been inaccessible on-chain. High fidelity in this context means accurately reporting data in a timely fashion.
Financial applications requires high-fidelity, time-sensitive, real-world data, which has historically been inaccessible on-chain. High-fidelity in this context means accurately reporting data in a timely fashion.


Contemporary music science introduced the concept of high fidelity to audiophiles by demonstrating the importance of minimizing all distortions in sound reproduction. Simply put, sound engineers focused on reproducing music accurately (with more granularity) on new digital mediums.
Contemporary music science introduced the concept of high-fidelity to audiophiles by demonstrating the importance of minimizing all distortions in sound reproduction. Simply put, sound engineers focused on reproducing music accurately (with more granularity) on new digital mediums.


== The Pyth Network ==
== The Pyth Network ==
[[File:Pyth Ecosystem .png|thumb|Pyth Ecosystem ]]
[[File:Pyth Explainer Diagram.png|thumb|How Pyth Works]]


=== Network Participants ===
=== Network Participants ===
Line 98: Line 111:


<u>'''Example:'''</u>
<u>'''Example:'''</u>
{| class="wikitable"
 
|+Pyth Network BTC/USD Price on 01/01/2022 @ 08.00.00AM
Let's assume the following values were submitted by publishers and returned by the Pyth smart contract on a specific time for BTC/USD.
!
 
!Price ($)         
[[File:Pyth_network.png|frameless|479x479px]]
!Confidence Interval (+/- $)
 
|-
|Pyth Publisher A
|51,000
|1,000
|-
|Pyth Publisher B
|50,000
|500
|-
|Pyth Publisher C
|49,000
|1,000
|-
|'''Pyth Output'''
|           '''50,000'''
|                   '''750'''
|}
''Note that 1,000 is an unusually wide confidence interval for bitcoin. The typical confidence interval is ~50 (0.1%).''
''Note that 1,000 is an unusually wide confidence interval for bitcoin. The typical confidence interval is ~50 (0.1%).''


''Reminder that the Pyth network price range extends from the minimum aggregate price minus 3 confidence intervals to the maximum aggregate price plus 3 confidence intervals.''
''Reminder that the Pyth network price range extends from the minimum aggregate price minus 3 confidence intervals to the maximum aggregate price plus 3 confidence intervals.''


So the '''Pyth price range extends from''' '''47,750 to 52,250.'''
So the Pyth price range extends from 47,750 to 52,250.
 
Now, let's assume the Pyth Governance selected Coinbase and Binance as the reference exchanges for any BTC/USD claim and the Human job returns the following values. 
 
[[File:Human Protocol Inputs.png|frameless|479x479px]]
 
''Reminder that the Human Protocol price range extends from the lowest reference exchange reported price to the highest reference exchange reported price.''


Now, let's assume the Pyth Governance selected Coinbase and Binance as the reference exchanges for any BTC/USD Claim Process and the Human Job returned the following values:
So the Human Protocol price range extends from 46,500 to 47,300.
{| class="wikitable"
|+Human Protocol BTC/USD on 01/01/2022 @ 08.00.00AM
!
!Lowest Reported Price ($)
!Highest Reported Price ($)
|-
|Coinbase
|46,500
|46,750
|-
|Binance
|46,750
|47,300
|}
So the '''Human Protocol price range extends from 46,500 to 47,300.'''


In this case, '''the Pyth range''' ($47,750 to $52,250) '''does not overlap with the Human range''' ($46,500 to $47,300). '''Therefore this claim is valid.'''
In this case, the Pyth range ($47,750 to $52,250) does not overlap with the Human range ($46,500 to $47,300).  
{| class="wikitable"
 
|+'''Identifying at-fault Pyth Publishers'''
Therefore this '''claim is valid''' and we now look for the at-fault publishers.
!
 
!Lowest Reported Price ($)
[[File:Identifying at-fault Pyth Publishers (3).png|frameless|480x480px]]
!Highest Reported Price ($)
 
|-
Pyth Publishers A & B do not overlap with the Human Protocol range, their stake is slashed and paid out to voluntarily paying users.  
|Human Protocol
|46,500
|47,300
|-
|Pyth Publisher A
|48,000
|54,000
|-
|Pyth Publisher B
|48,500
|51,500
|-
|Pyth Publisher C
|46,000
|52,000
|}
'''Pyth Publishers A & B do not overlap with the Human Protocol range and so are automatically identified as at-fault publishers. Their stake is slashed and paid out to voluntarily paying users.'''


== Pyth Network Products ==
== Pyth Network Products ==
Line 176: Line 146:
Each feed admits to the following features:
Each feed admits to the following features:


* '''Continuous Streaming:''' Thanks to Solana, Pyth is able to stream data at a sub-second latency and at affordable costs. The network’s publishers can update prices at every Solana slot — currently once every 400ms.
* '''Continuous Streaming:''' Thanks to Pythnet, Pyth is able to stream data at a sub-second latency and at affordable costs. The network’s publishers can update prices at every Pythnet slot — currently once every 400ms.


* '''Sophisticated Aggregation:''' As a reminder, the Pyth program computes this price on-chain by aggregating individual publishers' prices and confidence intervals. The first step of the algorithm computes the aggregate price by giving each publisher three votes — one vote at their price and one vote at each of their price +/- their confidence interval — and by then taking the median of all the votes.  The second step computes the distance from the aggregate price to the 25th and 75th percentiles of the votes, then selects the larger of the two as the aggregate confidence interval.  Overall, the aggregate price will always lie within the 25th-75th percentile of the publisher’s prices. In addition, Pyth is working on a staking system for publishers that incentivizes them to provide accurate data. In that system, each publisher will have a varying amount of stake. All of the results also hold for stake weights if Pyth replaces the percentage of publishers with the percentage of stake controlled. In the future, the weight calculation can be extended to include other non-price factors such as publisher’s stake, historical publisher’s performance, and other relevant metrics. For more information, please visit the Pyth [https://docs.pyth.network/how-pyth-works/price-aggregation docs].
* '''Sophisticated Aggregation:''' As a reminder, the Pyth program computes this price on-chain by aggregating individual publishers' prices and confidence intervals. The first step of the algorithm computes the aggregate price by giving each publisher three votes — one vote at their price and one vote at each of their price +/- their confidence interval — and by then taking the median of all the votes.  The second step computes the distance from the aggregate price to the 25th and 75th percentiles of the votes, then selects the larger of the two as the aggregate confidence interval.  Overall, the aggregate price will always lie within the 25th-75th percentile of the publisher’s prices. In addition, Pyth is working on a staking system for publishers that incentivizes them to provide accurate data. In that system, each publisher will have a varying amount of stake. All of the results also hold for stake weights if Pyth replaces the percentage of publishers with the percentage of stake controlled. In the future, the weight calculation can be extended to include other non-price factors such as publisher’s stake, historical publisher’s performance, and other relevant metrics. For more information, please visit the Pyth [https://docs.pyth.network/how-pyth-works/price-aggregation docs].
Line 183: Line 153:


* '''Price and Confidence EMA:''' Pyth also offers an exponentially-weighted moving average (EMA) price and exponentially-weighted moving average (EMA) confidence.These values are time-weighted averages of the aggregate price and confidence. Both the EMA price and confidence are natively available from Pyth price accounts.<ref>https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1</ref>While conceptually not as simple as an SMA (Simple Moving Average), the EMA has a particularly simple implementation for streaming applications such as Pyth.The exponential weighting method allows the entire history of prices and weights to be represented by a single number. Anyone can find more details about Pyth EMA [https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1 here] and the implementation in Pyth’s [https://github.com/pyth-network/pyth-client/blob/852b991fb4403dcf23043752e3a799a40ed0133b/program/src/oracle/upd_aggregate.h GitHub]
* '''Price and Confidence EMA:''' Pyth also offers an exponentially-weighted moving average (EMA) price and exponentially-weighted moving average (EMA) confidence.These values are time-weighted averages of the aggregate price and confidence. Both the EMA price and confidence are natively available from Pyth price accounts.<ref>https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1</ref>While conceptually not as simple as an SMA (Simple Moving Average), the EMA has a particularly simple implementation for streaming applications such as Pyth.The exponential weighting method allows the entire history of prices and weights to be represented by a single number. Anyone can find more details about Pyth EMA [https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1 here] and the implementation in Pyth’s [https://github.com/pyth-network/pyth-client/blob/852b991fb4403dcf23043752e3a799a40ed0133b/program/src/oracle/upd_aggregate.h GitHub]
== Pythnet and Cross-chain Feeds ==
=== Pythnet ===
Pythnet is an application-specific blockchain operated by Pyth's data providers. This blockchain is a computation substrate to securely combine the data provider's prices into a single aggregate price for each Pyth price feed. Pythnet forms the core of Pyth's off-chain price feeds that serve all blockchains (except Solana mainnet).
Pythnet is powered by Solana technology: it runs the same validator software, but is a separate network that is specially configured to be a proof-of-authority chain. The network depends on a tightly controlled supply of the chain's native token, called PGAS, which is currently controlled by the Pyth Data Association. Operating a validator on the network requires a large stake of PGAS tokens. The Pyth Data Association allows each data provider to operate one validator by delegating them the necessary stake. Each data provider is then given a sufficient quantity of PGAS tokens to publish prices to the network. The network is configured such that account creation is very expensive, preventing anyone without a substantial quantity of PGAS from deploying programs to the network. Once governance is live, it will take over management of the PGAS token from the Pyth Data Association.
[[File:Pythnet and Pyth Cross-chain .jpg|thumb|Pythnet and Pyth Cross-chain]]
Pythnet allows the network to scale with tremendous efficiency and a highly performant uptime.
Read more about Pythnet [https://docs.pyth.network/how-pyth-works/pythnet here]
=== Cross-chain Feeds ===
Pyth needs a cross-chain component to ferry prices on Pythnet to target chains. Pyth Network uses a “pull” update model for target chain prices: instead of continually pushing updates to each target chain, users pull the prices on-chain when they are needed. This pull model is highly scalable and allows Pyth Network to deliver high-frequency price updates for a large number of products without overwhelming the transaction capacity of target chains (or incurring excessive gas fees).
Data providers publish their prices on Pythnet. The on-chain aggregation program then aggregates prices for a feed to obtain the aggregate price and confidence. Next, the attester program regularly attests to the most recently observed Pyth prices and creates a Wormhole message to be sent to the Wormhole contract on Pythnet. The Wormhole guardians then observe the attestation message and create a signed VAA for the message.
The price service API continually listens to Wormhole for Pyth price update messages. It stores the latest update message in memory and exposes HTTP and websocket APIs for retrieving the latest update. (Anyone can run an instance of this webservice, but the Pyth Data Association runs a public instance for convenience.) When a user wants to use a Pyth price in a transaction, they retrieve the latest update message (a signed VAA) from the price service and submit it in their transaction. The target chain Pyth contract will verify the validity of the price update message and, if it is valid, store the new price in its on-chain storage.
Thanks to Pythnet, Pyth Network is able to expand to other blockchains with minimum friction. Users in other ecosystems can enjoy high-frequency and high-fidelity price updates on many types of assets ranging from crypto, equities, FX, and precious metals.
Read more about Pyth cross-chain [https://docs.pyth.network/how-pyth-works/cross-chain here]


== The Pyth Network Ecosystem ==
== The Pyth Network Ecosystem ==


=== Publishers ===
=== Publishers ===
[[File:Pyth Data Publishers.jpg|thumb|Pyth Data Publishers]]
[[File:Pyth Publisher .png|thumb|Pyth Publishers ]]
The Pyth network is made up of proprietary (first-party) data providers that contribute their data (inputs) on-chain to the Pyth program and create derived outputs. By having a diverse group of data publishers, ranging from exchanges (US accredited or Crypto) to trading firms and other financial services providers, the Pyth network creates a completely new composite market data stream at quality levels previously inaccessible.
The Pyth network is made up of proprietary (first-party) data providers that contribute their data (inputs) on-chain to the Pyth program and create derived outputs. By having a diverse group of data publishers, ranging from exchanges (US accredited or Crypto) to trading firms and other financial services providers, the Pyth network creates a completely new composite market data stream at quality levels previously inaccessible.


There are more than 55 publicly announced data providers. The full list of publishers can be found on the Pyth website [https://pyth.network/publishers/ here].
There are more than 75 publicly announced data providers. The full list of publishers can be found on the Pyth website [https://pyth.network/publishers/ here].


=== End-Users ===
=== End-Users ===
Pyth data is natively available on Solana. Accordingly, Pyth’s data is permissionlessly queryable (i.e. no paywall exists on the blockchain). The Pyth team will not know who is using the price feeds unless the person tells them (due to the permissionless nature of a blockchain).  
Pyth data is now available on for users on Ethereum, Optimism, BNB Chain, Solana, Aptos, Aurora and off-chain. Accordingly, Pyth’s data is permissionlessly queryable (i.e. no paywall exists on the blockchain). The Pyth team will not know who is using the price feeds unless the person tells them (due to the permissionless nature of a blockchain).  
[[File:Momentum November-22.jpg|thumb|Pyth Momentum Nov 2022]]


As of April 2022, there are over 50 identified Pyth integrations on Solana and off-chain. [[File:Pyth Metrics.jpg|thumb|Pyth Metrics as of April 2022]]Pyth users vary in types but usually offer the following services: borrow-lending, synthetics, derivatives trading, options vaults, and more.
As of November 2022, there are 100 identified Pyth integrations on Ethereum, Optimism, BNB Chain, Solana, Aptos, Aurora and off-chain.  
 
Pyth users vary in types but usually offer the following services: borrow-lending, synthetics, derivatives trading, options vaults, and more.




Notable Pyth users:
Notable Pyth users:
'''Ethereum'''
* [https://amptoken.org/ Amp] (collateral platform)
* [https://flexa.network/ Flexa] (payments platform)
* [https://www.hashflow.com/ Hashflow] (decentralized exchange platform)
* [https://www.ribbon.finance/ Ribbon Finance] (DeFi Options Vault)
'''Optimism'''
* [https://synthetix.io/ Synthetix] (derivatives and synthetics platform)
'''BNB Chain'''
* [https://venus.io/ Venus] (borrow-lending platform)
*[https://www.wombat.exchange/ Wombat Exchange] (decentralized exchange platform)
'''Solana'''
* [https://01.xyz/ 01 Exchange] (derivatives platform)
* [https://01.xyz/ 01 Exchange] (derivatives platform)
* [https://apricot.one/#/ Apricot] (borrow-lending platform)
* [https://apricot.one/#/ Apricot] (borrow-lending platform)
Line 210: Line 223:
* [https://lifinity.io/ Lifinity] (Proactive Market Maker)
* [https://lifinity.io/ Lifinity] (Proactive Market Maker)
* [https://mango.markets/ Mango Markets] (borrow-lending and derivatives platform)
* [https://mango.markets/ Mango Markets] (borrow-lending and derivatives platform)
* [https://www.ribbon.finance/ Ribbon Finance] (DeFi Options Vault)
* [[Solend]] (borrow-lending platform)
* [[Solend]] (borrow-lending platform)
* [https://synthetify.io/ Synthetify] (synthetics platform)
* [https://synthetify.io/ Synthetify] (synthetics platform)
* [https://www.zeta.markets/ Zeta Markets] (options and derivatives)
* [https://www.zeta.markets/ Zeta Markets] (options and derivatives)
'''Aptos'''
* [https://ariesmarkets.xyz/ Aries Markets] (borrow-lending platform)
* [https://argo.fi/ Argo] (stablecoin and borrow-lending platform)
* [https://aux.exchange/ AUX Exchange] (decentralized exchange platform)
* [https://pontem.network/ Pontem Network] (decentralized exchange and wallet platform)
* [https://m-safe.io/ Momentum Safe] (wallet platform)
'''Aurora'''
* [https://www.aurigami.finance/ Aurigami] (borrow-lending platform)


With many more broadcasted on Pyth [https://pyth.network/consumers/ website].
With many more broadcasted on Pyth [https://pyth.network/consumers/ website].
Line 222: Line 245:


<references />
<references />
[[Category:Solana]]
[[Category:Protocols]]
49

edits

Navigation menu