Blockchain Hypervision

Ape/rture
Deus Ex DAO
Published in
6 min readFeb 22, 2023

Starting with on-chain analytics on Dune or Flipside

On-chain analytic platforms like Dune and Flipside can be used to query data from the blockchain. In the last few months I have started my journey into the world of magically extracting on-chain data through SQL queries. These platforms have helped me:

  • Get insights about chains or ecosystem-wide usage
  • Tracking individual wallets
  • Understanding smart contracts and on-chain events better
  • Support trading theses with on-chain data
  • Complete Business Intelligence for projects
  • Improve my interpretation of dashboards describing on-chain data

In this article I have gathered some tips to help a new generation of Dune Wizards and Flipside analysts to use these blockchain analytics tools.

Tutorials

Learning these tools requires learning to walk, swim and cycle at the same time. You need to understand how the blockchain works, how to work with the data tool you are operating on and how to write SQL. This can be daunting but luckily the people of the internet are there to support you with great instructions, tutorials and courses. I compiled a few that can be a great starting point:

Live course: https://docs.metricsdao.xyz/analyst-resources/web3-analytics-101-live-course

Async course: https://docs.metricsdao.xyz/analyst-resources/web3-analytics-101-async-course

When you use these sources don’t blindly copy the queries given. Typing them gives a feel for the SQL syntax. Try to run and analyze line by line what is happening to get a better understanding of the data on the blockchain and the (sub)queries needed to fetch that data.

Fork everybody

Tired of writing the same query over and over again? Go fork yourself! Like the amazing visualization made by a great Dune Wizard? Fork that guy specifically. Dune and Flipside are great places to fork around.

Forking (in this context) is the action of copying and altering a query or dashboard made by you or another user. Both Dune and Flipside have this function easily available with one click of a button. Forking queries and dashboards reduces development time, while you can learn new ways to fetch different types of data from the tables.

May the fork be with you.

Fork, but verify

Errors happen and are part of data analytics. Maybe somebody forgot to add a filter condition, the protocol changed over time or you can simply improve the query in efficiency.

Using the fork comes with a responsibility. Queries from others are a great place to start, but queries might contain errors or might contain data differently defined. Always check the query and make sure you understand every line.

Who dis? Using documentation and check assumptions

Documentation is like sex. When it’s good, it’s very good. When it’s bad, it’s better than nothing.

When you pull data from a table you should understand the definition of the columns and metrics you are using. We need to make sure that if it quacks like a duck, it really is a duck. Misinterpreting a metric can have implications for your analysis, so use the documentation to ensure you are interpreting the data correctly.

Dune documentation: https://dune.com/docs/

Flipside documentation: https://docs.flipsidecrypto.com/

In addition, make sure to check assumptions on the data you are retrieving. For example: You want to retrieve all swaps with a smart contract, but you might have included the deployment transactions in the query. Check if you retrieve all the data and the conditions are working as expected. Try to find edge cases by taking a closer look at single rows of data, see where data is missing or actually popping up when you don’t expect it. Then go back and add extra conditions to your query to include or exclude these cases.

The helpful community

Misfortune becomes less when shared. Feel stuck with a problem? The online community can help you out! The community is used to discussing and solving problems together. Many members have been in your shoes and are happy to help. The communities can often be found in the Discord or on Twitter. Some quick tips:

  • Ask in a friendly tone of voice and respect the time of your helpers when you are chatting. They are spending their time out of goodwill, so be thankful for that.
  • Come up with a clear problem statement and share your code/work in progress. You will get help quicker if your problem is clear to the community.
  • Google for a tutorial or use the search function in Discord. Sorry to shatter your reality Snowflake but luckily your problems often aren’t unique. This search can save you from annoying others and getting to your solution faster. Win-win!

Can the dev do something? Asking the project team

If you are not sure which contracts to use or how the protocol functions, try asking the project team on Discord or Telegram directly. If you are working on a dashboard, you are doing them a favor by creating insights into their project. They will probably be eager to help you out with the correct information.

In addition teams might share your dashboard through their Twitter or other official channels, showing appreciation for your work. In some cases you can even land an assignment or a job with the team. Turning your skills into a revenue stream!

Use V2 (on Dune)

V2 is optimized so it is quicker to find the correct data and you can choose from two query engines: Dune SQL and Spark SQL.

That’s it. That’s the tweet.

Data analysis is never done

Data analysis is an iterative process. After you have made your first version of your dashboard ask other Dune Wizards or Flipside analysts, the project community, the team or even your 14 Twitter followers for feedback.

Their feedback can help you improve your current visualizations or straighten your data definitions. Plan time for the next iteration of your visualizations and dashboard after you release it.

Often you get questions your dashboard can’t fully answer since it involves new metrics and visualizations. This means your dashboard actually makes the audience think and they are actively interpreting the data you present them. See it as a big complement! Their questions might trigger new research ideas to expand your current dashboard.

This is what happens when you create a dashboard:

Build a personal profile and brand

I’ve been hinting towards this tip throughout the article, but the last tip is to build an online presence. It will track your progress and experience, but also opens you up to feedback from the public. Even though the public can be daunting, nasty and at times misunderstanding, you can filter that and provide value to your supporters, fans and fellow data analysts. Most people want to see you succeed and even critique can be used to hone your skills.

Your presence is also your business card and a way to show your portfolio. This can help you land a paid assignment or a job, or get access to communities or deals you would otherwise never have access to before.

Below you can find a list of great examples on how sharing your analysis and insights can give you a central role in the community.

Some of my favorite analysts currently are:

Check out their twitter, dashboards and queries for good examples. You can fork their work for a good starting point in your own research.

Thanks for reading my tips on how to get started with Dune and Flipside. See you on-chain!

--

--

Ape/rture
Deus Ex DAO

Always improving, always learning | Counsel member and building at Deus Ex DAO