Dune Analytics Simplifies Blockchain Data Analysis – The New Stack

One of the more interesting facets of blockchain is the fact that every single transaction is recorded as a publicly viewable record. Any developer can analyze the raw transaction data through direct queries of the blockchain. Interpreting those records in a meaningful way is quite a bit more complicated because each record may also be the result of triggering multiple smart contract interactions and some of the relevant metadata about the transaction record may be stored off-chain. Dune Analytics is attempting to make blockchain data more accessible by organizing it into more familiar database table structures.

One of the reasons Dune is rapidly increasing in popularity is the fact that querying data and creating dashboards is both free to all users and familiar to most developers with SQL skills. If you can write SQL queries and have a basic understanding of blockchain data structures, you can create visualizations and dashboards of blockchain data. Community contributors are affectionately referred to as “Wizards.”

In an interview with The New Stack, Hugo Sanchez, Growth Manager at Dune Analytics, said, “Dune is a community-first platform. There’s so much data and so many insights to be surfaced that it is impossible for a single company to do all the data analysis themselves. By being open, we are trying to create transparency in the space and increase information access. Being community oriented is a strategy to have better data and better ways to surface the data.”

There are numerous community-created queries and dashboards to browse in the Dune library. One popular example is this dashboard of statistics, created by Dune user nguyentoan, on the usage of the “move to earn” app Stepn, which was much hyped for its Q2 2022 profits. If the example chart below is any indication, users have since moved on to something else in Q3.

Blockchain Data Queryable via SQL

The original Dune database was built using Postgres and supported PostgreSQL for queries. A newer Dune Engine V2 was built on Apache Spark hosted on Databricks, which uses Databricks SQL for queries. In both cases, you can query raw tables of blockchain data from Ethereum, Solana, Polygon, Binance Smart Chain, Optimism and Gnosis Chain, with a smaller set of tables containing decoded smart contracts. With Dune Engine V2, the Wizard theme is extended by referring to community contributions of views, tables, and data validation tests as “Spells.”

Free access to create and share dashboards comes with a few limitations. Any dashboard you publish is viewable by the rest of the community with Dune watermarking. There is no way to extract the data from Dune with a free account. A Pro account grants you access to make your queries and dashboards private with no watermarking. You can also export the results of your queries as a CSV. Currently, free accounts allow you to run three queries in parallel, while a pro account expands that limit to six parallel queries.

I asked Sanchez about the possibility of an API for executing queries and exporting results. According to Sanchez, an API is the Dune community’s most requested feature. The company has plans to ship an API before the end of the year, which will likely make it easier to include blockchain data in your own analytics applications.

While much of what’s created on Dune is done by the community for the community, the company has also created a program for Wizards to get paid via the Wizard Request Program. This program basically allows anyone to create a data analytics request, along with a bounty for the request, which is posted to the greater community for fulfillment. If you’ve solid SQL skills, this is definitely a way to contribute to Web3 projects without needing to be a Solidity or Rust developer.

Featured image from DepositPhotos ID: 184856558 by bluebay2014