1st generation Cardano oracles, connecting your nuts to squirrels since epoch 228.

This service provides the first generation of oracles running on the Cardano blockchain. It uses metadata to record data from the outside world to the blockchain. Everyone, but primarily dApps developers, can then reuse this data.

The oracles registry is recorded under transaction metadata label 1967 and data points are posted under label 1968.

Your application can view the data directly on the blockchain. Here’s an example of displaying the current price of ADA in EUR, if you are using cardano-db-sync database:

$psql -qtAX -U csyncdb -c \ 'SELECT json FROM tx_metadata WHERE key = '1968' ORDER BY id desc LIMIT 1' \ | jq -r '.ADAEUR[].value' 0.090029 Or use historical data.$ psql -qtAX -U csyncdb -c \
'SELECT json FROM tx_metadata WHERE key = '1968' ORDER BY id desc LIMIT 12' \
| asciigraph -h 10 -w 40 -c "ADAEUR over the last 12 hours"

0.090 ┤                   ╭──╮
0.090 ┤                 ╭─╯  ╰╮      ╭╮
0.089 ┤                ╭╯     ╰╮   ╭─╯╰───╮
0.089 ┤               ╭╯       ╰╮╭─╯      ╰╮
0.089 ┤              ╭╯         ╰╯         ╰─╮
0.089 ┤             ╭╯                       ╰
0.088 ┤            ╭╯
0.088 ┤           ╭╯
0.088 ┤          ╭╯
0.088 ┤  ╭───╮  ╭╯
0.087 ┼──╯   ╰──╯
ADAEUR over the last 12 hours

Possibilities are endless!

## What is being served?

Right now, the NUTS nut.link oracle is serving following data points from different sources:

Ticker Source
AGIBTC Coingecko
BTCDIFF Trezor’s blockbook
BTCUSD Coingecko
ERGUSD Coingecko
ERGUSD Ergo oracle pools
TSLA Investors exchange
DRAND League of Entropy randomness beacon

Values of these data points are posted to the Cardano mainnet approximately once an hour.

Want to add data points? Get in touch!

## Feed me

The nut.link oracle NUTS has enough fuel to run operations for .19 days.

Remaining days are calculated using the price data from the oracle itself. Pretty cool, huh?

Extend oracle’s life by feeding its address addr1q85yx2w7…p0h55q2q7qm63t some Lovelaces and come back in a few minutes to watch the remaining fuel increase!

## Join the game

You are welcome to join with your own oracle and help with the decentralization of the data points.

## Current list of oracles

STKHO STKH Oracle A Cardano Oracle - For the Community, by the Community. addr1v8w6wfljn…0kaldsetcsrw3ep4
CANUK Cardano Canucks Oracles A Canadian oracle provider operated by Cardano Canucks Stake Pool addr1qygvjldfxxhh…pkz9wqay69js
MOXIE MoxiePool MoxiePool is live because we love everything about Cardano. Let's make some block addr1qxj4cl50…sp7s4j55j9

If you want to join this list, this is a two step process: registration and data posting.

### Registration

As mentioned before, we are using 1967 transaction metadata label as the registry of oracles.

{
"1967": {
}
}

The oracle metadata is the same as in case of Cardano staking pool (generated using the same method) with one important addition - address field pointing to your oracle payment address, which is used to post your data points. This metadata has to be posted from this address, so the consumer can verify that you control the domain with the provided address.

### Data points posting

Data posting is using a different transaction metadata label from the registry. We are using 1968 for posting data.

{
"1968": {
{
"value": "0.10466",
"source": "coinGecko"
},
{
"value": "0.10409800535729975",
"source": "ergoOracles"
}
],
{
"value": "0.088044",
"source": "coinGecko"
}
],
"ERGUSD": [
{
"value": "0.385308",
"source": "coinGecko"
},
{
"value": "0.38474700005299967",
"source": "ergoOracles"
}
],
"TSLA": [
{
"value": "428.82",
"source": "investorsExchange"
}
]
}
}

As you can see above, the ticker of the data point contains an array of objects with ticker’s value and the source of the data point.

You can post as often as you want, but it might be best to keep a similar interval. In our case, it is posted once an hour.

## Questions

• What is an oracle?

• An oracle in the blockchain is a trusted source of data that sends information from the outside world to the blockchain, exposing it to tools and smart contracts.
• What is this? Oracles for ants?

• Yes, you are right. This is the first generation of oracles on Cardano. It is a bit rough around the edges, but as we will get more Gougen features, we will be able to build “real” oracle pools using eUTXO, providing incentives, governances and much more. To learn more about this topic, watch the Oracle Pools research presentation by brilliant Robert Kornacki from Emurgo.
• Is this decentralized?

• Only by the number of oracles for your ticker. As an application owner, it is currently your responsibility to select the oracle providers you trust and sanitize the data points as you use them, if needed.
• WEN Gougen

• This is it! Well, just the first pieces really, but already enough to start building cool things. Next year, we will get more features, such as smart contracts that will unlock the full potential of Cardano.

## Contact

Send me a message on Twitter @stakenuts or reach me on Telegram @Marek Mahut.

Come back to see the growing number of oracles!