Stork for StarkNet
What is Stork, and how to use it?

Welcome to Stork for StarkNet

Sep 20, 2022: We have put new feature development on hold while we wait for changes affecting StarkNet development to stabilize. The current Stork on-chain oracle will remain available, and we encourage current users to consider our decentralized Off Chain solution for more flexible and frequent price updates on StarkNet and StarkEx.
Stork is an oracle for the StarkNet ecosystem build on StarkWare. At the moment, Stork is available on Testnet. Keep in mind that Stork is still actively being developed, so contract addresses will change regularly. We will make an effort to keep contracts updated for a few weeks, but it is not guaranteed. Check back here for the latest contract address.

Upcoming Milestones

Date
Milestone
Aug 16, 2022
Prior to this date, oracles would alternate updates to get_bundle and get_value, with a non-deterministic preference for get_bundle. This resulted in apparent "gaps" in the data when only referencing one feed or the other. Going forward, both data feeds are updated simultaneously.
Sep 2022
Final Testnet update before Mainnet, with multiple new features and backwards-incompatible proxy changes (i.e. new contract required)
Oct 2022
First Mainnet release

Quick Start Guide

Start using Stork in seconds in Python, Cairo, or the CLI
or learn more about the API.

Who is Stork For?

We encourage everyone on the StarkNet ecosystem looking for asset prices to use Stork. Stork will work great if your application relies on periodic price updates for a wide range of assets. Ultimately, Stork will most benefit applications that rely on highly up-to-date prices covering a wide range of assets, including non-crypto assets.

Contracts

OracleProxy.json
6KB
Code
Oracle Proxy ABI
IOracleProxy.cairo
1012B
Binary
Oracle Proxy Interface

This guide references the following tools:

General Guidelines

Encoding

In general, all assets that are indicated as strings are expected to be converted into Base 10 ASCII encoded strings. Most StarkNet libraries will handle this encoding for you – feel free to experiment.
"ETH/USD".encode('ascii').hex() # String to Hex
int('0x04609',16) # Hex to Int
bytearray.fromhex(hex(1234)[2:]).decode() # Int to Hex

Authentication

All calls are unauthenticated. Writing prices is authenticated using account authentication, meaning publishers need to have their addresses allowlisted.

Timestamps

It's always a good idea to check the timestamp; StarkNet testnet is known for having downtimes, which may delay the update.

Update Frequency

Frequency depends on when oracle publish prices + testnet block time. Right now, it's typically every 5-10 minutes.

New Assets

New assets are easy to support – if you're interested in providing an oracle for your own price, while benefiting from some existing oracle infrastructure, reach out to us and we'll permission you.
Copy link
On this page
Welcome to Stork for StarkNet
Upcoming Milestones
Quick Start Guide
Who is Stork For?
Contracts
Recommended Tools
General Guidelines
Encoding
Authentication
Timestamps
Update Frequency
New Assets