How to deploy a price feed on Avalanche $AVAX

Rokowski
The Witnet Oracle Blog
3 min readAug 8, 2022

The Witnet network has been providing oracle price feeds to Avalanche since March 17, 2022.

Why the Witnet oracle is easy to use for price feeds on Avalanche

Because Witnet is a layer 1 blockchain running on it’s own single-purpose built network, it’s very simple to integrate both onto new chains, and into your applications. Witnet is currently providing data and randomness to 18+ different EVM compatible chains, see some more projects using Witnet here.

The best part is that you don’t actually need to hold any of the $WIT coin, the native coin of the Witnet ecosystem that powers the cryptoeconomic incentive of the network. Developers who want to query the Witnet network are paying fees related to that query in the native coin of the chain they are building on, in this case, $AVAX.

Furthermore, in addition to being one of the cheaper oracle services, Witnet was built for decentralization. Those who want to incorporate strong cryptoeconomic guarantees would use Witnet because they don’t need to trust that any one node operator is honest, unlike other oracle services; as within Witnet there is an aggregation period of multiple nodes, and after this period, slashes any malicious nodes- no trust needed!

How to use the Witnet oracle for price feeds in your application on Avalanche

As of right now there is one price feed available on Avalanche Mainnet (AVAX/USD) and 3 on Fuji Testnet (AVAX/USD, BTC/USD, and ETH/USD). In order to take advantage of these various feeds, you can check the contract and get started here.

Witnet’s Price Feeds Router allows your smart contract, or Web3 application, to get the latest updated price value of any of the currency pairs subsidized by the Witnet Foundation, without needing to know the actual contract addresses in charge of requesting and receiving price updates from the Witnet oracle’s sidechain.

The $AVAX/USD price feed is available on mainnet and is being updated roughly every 24 hours or every time the price moves by more than 3.5%. By using this link, you’ll see the price feed directly on the data feed explorer page and you can integrate through the proxy (see above), or integrate the feed directly.

To discover the other currency pairs that the oracle provides price feeds for take a look at these docs. If you aren’t finding price feeds that you need, you are also able to request new ones through this form. Additionally, you can deploy your own price feed or pair by following one of these tutorials (HTTP GET & POST).

If there are any questions or you need access to more resources, please join our Discord, choose the “developer” role (optional), and navigate to #-dev-lounge or #-solidity and our community can help! In addition, the Witnet oracle is capable of fetching any publicly available API through HTTPS Get, Post, and GraphQL. Furthermore, the Witnet randomness oracle is available for your NFT, GameFi, and lottery use cases!

Connect with Witnet:

Website | GitHub | Twitter | Discord | Telegram | Reddit | YouTube

--

--