Stork
Ultra low latency data on-chain
What is Stork?
Stork is an oracle protocol that enables sub-second data feeds on-chain. The core technical principles of Stork are:
- Modularity
- Low Latency
- Cost efficiency
- Arbitrary Data Support
- Transparency, Verifiability, and Security
Stork’s full documentation is available here.
How does it work?
Stork is implemented as a pull oracle. Stork continuously aggregates data from our decentralized publisher network, verifies that data, audits it, then makes that data available. This data can then be pulled onto TAC via the Stork contract, and then used by any EVM application on TAC. For more information, please refer to How It Works.
Quickstart
Using Stork on TAC requires two primary steps:
- Pulling data from Stork and putting it on-chain via the Stork contract when it’s needed.
- Reading data from the Stork contract in your EVM contract.
Pulling Data from Stork
The easiest way to pull data from Stork and make it available on-chain is to use the Stork Chain Pusher and configure it to push any relevant assets to TAC. The Stork Chain Pusher will automatically listen to the Stork aggregator websocket, and push that data to the Stork contract on TAC whenever certain conditions are met. The following conditions are supported and can be combined:
- Percentage Change: Push data when the price changes by a certain percentage.
- Time Interval: Push data at a regular interval.
For more information on how to use the Stork Chain Pusher, please refer to Putting Data On-Chain.
Reading Data from the Stork Contract
Reading from the Stork contract is as simple as calling its getTemporalNumericValueV1(bytes32 id)
function from your contract. This function takes an encoded asset ID of the relevant asset and returns the latest value for that asset in the form of a TemporalNumericValue
struct, which contains an integer value (multiplied by 10^18 for precision) and a UNIX nanosecond timestamp.
For more information on how to read data from the Stork contract, please refer to the EVM Contract API.
Asset IDs
Stork supports a wide range of assets and asset classes. For a full list of supported assets and their encoded asset IDs, please refer to Supported Assets.
Contract Addresses
Stork is deployed on the following TAC chains:
Chain | Address |
---|---|
TAC Turin | 0xacC0a0cF13571d30B4b8637996F5D6D774d4fd62 |