nut.link

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

What is this about?

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' \
  | jq -r '.ADAEUR[].value' \
  | 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
ADABTC Coingecko
ADAEUR Coingecko
ADAUSD Coingecko
ADAUSD Ergo oracle pools
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

Ticker Name Description Address
NUTS StakeNuts.com StakeNuts nut.link oracle pool addr1q85yx2w7…p0h55q2q7qm63t
STKHO STKH Oracle A Cardano Oracle - For the Community, by the Community. addr1v8w6wfljn…0kaldsetcsrw3ep4
CRFA CardanoFans CardanoFans - we believe in access to financial system for everybody addr1v8yczm692ph…97fhfw2fgjc4chr79
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": {
    "metadata": "https://nut.link/metadata.json",
    "hash": "6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af"
  }
}

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": {
    "ADAUSD": [
       {
         "value": "0.10466",
         "source": "coinGecko"
       },
       {
         "value": "0.10409800535729975",
         "source": "ergoOracles"
       }
    ],
    "ADAEUR": [
       {
         "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

Contact

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

Come back to see the growing number of oracles!