Using Chainlink Oracle Data with Splunk Ledger Analytics

Antoine Toulme
Splunk DLT
Published in
3 min readJun 1, 2022

Chainlink Data Feeds give smart contracts secure access to external data. The graphic below, taken from a Chainlink blog post, explains the process:

  1. Chainlink nodes source data for a specific data point from multiple data aggregators.
  2. Through a process involving multiple layers of aggregation, the Chainlink nodes come to an agreement on the most accurate value for that data point.
  3. One of the Chainlink nodes sends a transaction to store this new data point on the ledger.

Chainlink nodes provide this service across multiple chains for a wide range of data points. Developers can use this data in smart contracts as tamper-proof inputs.

With Splunk, we have built a view of this process as experienced by the Chainlink node operator. Note how each Chainlink node reports slightly different values over time. In the case of the feed, the average of the reported values is used.

On https://data.chain.link, you can view the list of Data Feeds for each chain. For more detailed information about Data Feeds, you can also consult the developer documentation. A popular feed is the ETH/USD pair, which represents the value of Ethereum in US Dollars, created by aggregating price data from multiple exchanges and data aggregators.

The page on the ETH/USD pair links to a specific contract on Etherscan. With Etherscan, we can interrogate the view functions exposed by the contract. The most interesting view function is latestAnswer, giving us the latest data point:

This is the value reported by the ETH/USD Chainlink Data Feed from the latest known block, as experienced by Etherscan. We can use our own infrastructure to interrogate the ledger and receive the answer for each block of the blockchain.

We ingest all those values and can show them as data points on a chart:

Better yet, those values come handy when we try to express the monetary cost of transactions — the dollar value of the gas cost associated with the transaction. That’s because we have this data available for every block. See our blog post on Gitcoin votes for a practical example.

Chainlink services have experienced rapid growth in the last few years. By providing access to a rapidly expanding library of critical market data on-chain, we expect Chainlink services will empower us with many more possibilities in the future to gain unique insights from data.

Do you have a suggestion for analytics for a Chainlink Data Feed, or would you like to see another visualization of Chainlink Data Feeds? Please join us on Discord to discuss.

--

--