description |
---|
Consume Pyth Network prices in EVM applications |
On-chain EVM programs can use the Solidity SDK to read Pyth prices. The off-chain portion of the application can use pyth-evm-js to generate price update transactions. This repository's Quickstart includes an example of both the on- and off-chain code necessary to integrate with Pyth.
Oracle Swap is an end-to-end example application that uses Pyth Network. This application is an AMM that allows users to swap two assets at the Pyth-provided exchange rate. This application contains both the contract, and the frontend to interact with the contract.
Pyth EVM price pusher is a service that regularly pushes price updates to the on-chain Pyth contract. Protocols can run this service to push regular updates to the on-chain Pyth price based on various conditions, such as a minimum update frequency, or a price change threshold. This service is useful for protocols that already depend on regular push updates and want to simplify migrating to Pyth. Please see the github readme for additional information on this service.
In addition, you can find an in-depth explanation from one of our contributors, Ali: How to Build with Pyth Data on EVM Chains (with Pusher): Pyth Tutorials
Pyth is currently available on the following EVM-based chains:
The price feed IDs for EVM chains differs depending on whether they are a mainnet or testnet (see above):