How to get the USD price of Fan Tokens
Your smart contract doesn't have to live in an ivory tower. It can benefit from using real-world data.
Accessing external, real-world data is useful because it allows smart contracts to execute based on real-time events and conditions, making them more versatile and applicable to a wide range of scenarios.
In the blockchain world, this is done through what we call an Oracle.
What is an Oracle?
Oracles bridge blockchains with the external world, allowing smart contracts to access real-world data, crucial for applications in finance, supply chains, and gaming.
Oracles are essential for blockchain's real-world integration.
What does it mean for Chiliz Chain developers?
Provided you get access to an Oracle that offers real-time data that is relevant to your project, you can build something that remains up-to-date with the real world.
How to do it using Pyth?
Pyth Network primarily provides high-fidelity financial market data. Pyth’s most well-known oracle is Price Feeds, which provides real-time prices for many assets on several blockchain ecosystems, including Solana, many EVM chains, Aptos, Sui, NEAR, and several Cosmos chains.
In particular, Pyth's Price Feeds gives you access to the live value of Fan Tokens in US dollars, such as PSG, JUV, BAR and others (search for "fan tokens" on this page).
The Pyth documentation provides a complete explanation on how to use real-time data in EVM contracts.
Last updated