Difference between revisions of "Pyth Network"

Jump to navigation Jump to search
m (minor typo on the Pyth logo)
(Minor edits on the sub-headers, and added a few images)
Line 24: Line 24:
==General Concepts==
==General Concepts==


==== Definitions ====
=== Definitions ===
'''Total Value Secured (TVS)''': represents the aggregate amount of Total Value Locked (TVL) within all protocols and platforms that depend on the proper operation of an oracle network to operate.
'''Total Value Secured (TVS)''': represents the aggregate amount of Total Value Locked (TVL) within all protocols and platforms that depend on the proper operation of an oracle network to operate.


'''[[Total value locked|Total Value Locked (TVL)]]''': represents the sum of all assets deposited in decentralized finance (DeFi) protocols earning rewards, interest, new coins and tokens, fixed income, etc.  
'''[[Total value locked|Total Value Locked (TVL)]]''': represents the number of assets that are being staked in a specific protocol at the moment: this value is not meant to show the number of outstanding loans, but rather the total amount of underlying supply that is being secured by a specific protocol or application by DeFi completely.  


====Oracles====
===Oracles===
Blockchain oracles act as the bridge between smart contracts living on a blockchain and real-world data. They are designed to relay information from off-chain sources (data outside a blockchain) to an on-chain network. In most cases, the off-chain data is used to trigger smart contracts that need external data to execute.<ref>https://datafloq.com/read/a-comprehensive-guide-defi-oracles-fundamentals-2/</ref>
Blockchain oracles act as the bridge between smart contracts living on a blockchain and real-world data. They are designed to relay information from off-chain sources (data outside a blockchain) to an on-chain network. In most cases, the off-chain data is used to trigger smart contracts that need external data to execute.<ref>https://datafloq.com/read/a-comprehensive-guide-defi-oracles-fundamentals-2/</ref>


Borrow-Lending protocols, such as [[Solend]], rely on oracle price feeds to determine the value of the underlying collaterals supplied and/or borrowed. Whenever the collateral provided is worth less than 1 + x% (usually x = 30) of the borrowed collateral, borrow-lending platforms must liquidate a user's position to keep the overall platform healthy (enough collateral to repay the outstanding debt).
Borrow-Lending protocols, such as [[Solend]], rely on oracle price feeds to determine the value of the underlying collaterals supplied and/or borrowed. Whenever the collateral provided is worth less than 1 + x% (usually x = 30) of the borrowed collateral, borrow-lending platforms must liquidate a user's position to keep the overall platform healthy (enough collateral to repay the outstanding debt).


==== The Price of an Asset ====
=== The Price of an Asset ===
Consider a single stock, say [[wikipedia:Tesla,_Inc.|TSLA]].  
Consider a single stock, say [[wikipedia:Tesla,_Inc.|TSLA]].  


Line 44: Line 44:


Another “price” that could be considered the proper price is actual transaction prices. “Last traded price” is a price that is often reported, and especially in a thinly traded stock, might be even more representative of the true price than the current best bid and best ask prices (where the bid-ask spread might be very wide).<ref name=":0">https://pythnetwork.medium.com/what-is-confidence-uncertainty-in-a-price-649583b598cf</ref>
Another “price” that could be considered the proper price is actual transaction prices. “Last traded price” is a price that is often reported, and especially in a thinly traded stock, might be even more representative of the true price than the current best bid and best ask prices (where the bid-ask spread might be very wide).<ref name=":0">https://pythnetwork.medium.com/what-is-confidence-uncertainty-in-a-price-649583b598cf</ref>
[[File:Pyth Feed Real-Time.png|thumb|Pyth Price and Confidence Interval]]


==== Uncertainty (or “Confidence”) in a Price ====
=== Uncertainty (or “Confidence”) in a Price ===
In scientific and engineering fields, observation or measurement is almost always accompanied by a measurement of uncertainty. The distance between two points might be measured to be 10.12m +/- 0.01m. The time it took for a car to travel that distance might be 1.23s +/- 0.05s. The measurement of uncertainty is the observer’s best estimate of how far off from the “true” value their measurement is likely to be, given the precision of their measuring equipment, the difficulty in making the measurement, and potentially other factors the observer deems important.
In scientific and engineering fields, observation or measurement is almost always accompanied by a measurement of uncertainty. The distance between two points might be measured to be 10.12m +/- 0.01m. The time it took for a car to travel that distance might be 1.23s +/- 0.05s. The measurement of uncertainty is the observer’s best estimate of how far off from the “true” value their measurement is likely to be, given the precision of their measuring equipment, the difficulty in making the measurement, and potentially other factors the observer deems important.


Pyth extends the concept of measurement uncertainty to asset prices with its '''Confidence Interval''' (discussed below).<ref name=":0" />
Pyth extends the concept of measurement uncertainty to asset prices with its '''Confidence Interval''' (discussed below).<ref name=":0" />


==== 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.
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.


Line 56: Line 57:


== The Pyth Network ==
== The Pyth Network ==
[[File:Pyth Ecosystem .png|thumb|Pyth Ecosystem ]]


==== Network Participants ====
=== Network Participants ===
3 different types of stakeholders will interact within the network:
3 different types of stakeholders will interact within the network:


Line 65: Line 67:
* '''Delegators''' stake tokens on a specific product and publisher to (1) earn a share of the data fees and (2) increase the price feed robustness but may potentially lose their stake if the oracle is inaccurate.
* '''Delegators''' stake tokens on a specific product and publisher to (1) earn a share of the data fees and (2) increase the price feed robustness but may potentially lose their stake if the oracle is inaccurate.


==== Participants Incentives ====
=== Participants Incentives ===
'''Publishers''' must stake PYTH tokens to participate in the protocol and earn a share of the rewards. Publishers earn a share of the data fees for the products they price. The data fees paid for a product will likely grow in proportion to consumer usage of the price feed. Publishing erroneous data (voluntarily or not) to the network may lead to the publisher's stake being slashed.
'''Publishers''' must stake PYTH tokens to participate in the protocol and earn a share of the rewards. Publishers earn a share of the data fees for the products they price. The data fees paid for a product will likely grow in proportion to consumer usage of the price feed. Publishing erroneous data (voluntarily or not) to the network may lead to the publisher's stake being slashed.


Line 72: Line 74:
'''Delegators''' are incentivized to participate in the protocol to earn data fees (coming from consumers’ data fees).  
'''Delegators''' are incentivized to participate in the protocol to earn data fees (coming from consumers’ data fees).  


==== Network Interactions ====
=== Network Interactions ===
The Pyth protocol consists of 4 on-chain core mechanisms:
The Pyth protocol consists of 4 on-chain core mechanisms:


Line 80: Line 82:
* '''Governance''' will be using a coin-voting system that will help determine the high-level parameters of the three mechanisms above. Parameters include what types of tokens may be used for data fees; which products are listed on Pyth; the share of data fees allocated to publishers, delegators, and other uses; the number of PYTH tokens that publishers must stake or enable claims to be filed against a product, and more.[[File:Pyth Ecosystem Diagram.png|thumb|Pyth Ecosystem Diagram]]
* '''Governance''' will be using a coin-voting system that will help determine the high-level parameters of the three mechanisms above. Parameters include what types of tokens may be used for data fees; which products are listed on Pyth; the share of data fees allocated to publishers, delegators, and other uses; the number of PYTH tokens that publishers must stake or enable claims to be filed against a product, and more.[[File:Pyth Ecosystem Diagram.png|thumb|Pyth Ecosystem Diagram]]


==== The Claims Process ====
=== The Claims Process ===
The purpose of this process is to verify that the Pyth aggregate price and confidence interval for a product were incorrect in comparison to some ground-truth off-chain data.  
The purpose of this process is to verify that the Pyth aggregate price and confidence interval for a product were incorrect in comparison to some ground-truth off-chain data.  


Line 91: Line 93:


* The maximum and minimum price per publisher and maximum confidence interval during the time in question.
* The maximum and minimum price per publisher and maximum confidence interval during the time in question.
 
''Note that the reference exchanges will be selected in advance per-product by Pyth protocol governance.''
''Note that the reference exchanges will be selected in advance per-product by Pyth protocol governance.''
The claim will be successful if (1) the price feed published an aggregate price during the claim interval, and if (2) the published aggregate price, incorporating any uncertainty provided by the confidence interval, disagrees with the reference prices.  
The claim will be successful if (1) the price feed published an aggregate price during the claim interval, and if (2) the published aggregate price, incorporating any uncertainty provided by the confidence interval, disagrees with the reference prices.  


Line 149: Line 150:
== Pyth Network Products ==
== Pyth Network Products ==


==== Data Feeds ====
=== Data Feeds ===
Pyth’s ‘main product’ is its set of live price feeds. Find all the price feeds available on the Pyth Network website.
Pyth’s ‘main product’ is its set of live price feeds. Find all the price feeds available on the Pyth Network [https://pyth.network/markets/ website].


Each feed admits to the following features:
Each feed admits to the following features:
Line 161: Line 162:
== The Pyth Network Ecosystem ==
== The Pyth Network Ecosystem ==


==== Publishers ====
=== 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 55 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 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).