How to Build Your First Blockchain Analytics Dashboard as a Beginner
It is alright if you are not familiar with Ethereum or SQL. You can build the dashboard by following the steps. I hope this will motivate you to explore blockchain analytics further.
Blockchain data
Ethereum is a decentralised protocol that supports the execution of smart contracts. It is one of the most popular blockchain platforms. Every node stores a complete copy of the blockchain data.
However, this data is not stored in a suitable way to write efficient search, filter, and aggregation queries. Many data providers (Graph, Google Bigquery, Dune, Flipsidecrypto) are attempting to make data accessible for analysts and researchers.
Dune is a data provider/mapper that enables users to run SQL queries against blockchain data. It parses data from the node and loads it into a postgres database. It is cost-free with restrictions.
In this article, we’ll attempt to create a simple dashboard that answers below questions:
- The total number of smart contracts, transactions, and user accounts in the Ethereum Network.
- How it has changed over time?
New to trading? Try crypto trading bots or copy trading
When completed, the dashboard would look like this:
Step 1 : Setup a New Query
Navigate to Dune.com and launch a query window as shown.
Step 2: Smart Contracts Created Since Inception
Smart contracts are lines of code that run in a decentralised network.
To create the smart contract, the Ethereum Virtual Machine (EVM) executes a CREATE opcode that gets recorded in VM traces. We could find contract creation events by scanning the traces for the CREATE opcode.
Copy the above query into the new query window and run it. After the query is run, we could create a counter chart to display the results.
Step 2: Every Transactions Processed Till Date
Any changes to account balances or smart contract data happens through transactions. Transactions are triggered by user accounts(referred as EOA accounts) and captured in ethereum.transactions table
Close the previous query window. Create a new query based on the one above and, as before, create a counter visualisation for the results. The final chart should resemble the following:
Step 3: Active Users in the Network
When a user initiates a transaction, the user address is recorded as part of the transaction data. We could list all wallet accounts that have interacted at least once by looking at the unique values of the from column.
Let’s make the counter chart using the same steps as before. The result would seem as follows:
Step 4: Let’s create our first dashboard.
Launch a new dashboard. Add the queries that were created in the previous steps to the dashboard. Make sure to include the counter chart rather than the results. Each step is illustrated in detail below.
Resize and reposition the widgets so that they are all on the same row.
Step 6: Let us examine the above data over time, beginning with smart contracts.
The figures above represent the total count since Ethereum’s inception. It does not state the current trend.
- Is there any change in smart contracts deployment?
- What is the impact of the recent bear market on user activity?
To see the trend, we can group the data by month.
Open a new query window and execute the above query. Then, as shown below, create a chart.
It is now time to group the transactions and user accounts by month and create charts similar to the one shown above.
Finally, as in Step 4, add the three charts created above to the dashboard.
I hope your dashboard now looks like this or even better.
Now, using the text widget, add your commentary to explain what have you observed.
Save the dashboard and show the world what you’ve accomplished!
FAQs
- Why is my query failing or taking too long?
Please ensure that you are using the “Dune Engine V2” as shown in step 1.
2. Can I download the data to do further analysis?
Unfortunately, Dune does not permit us to download in our free account. One can upgrade their plan to enable download options.
3. What comes next?
We will delve into Ethereum by investigating transactions, gas prices, and token standards. Watch this space.
References
- Ethereum Overview Dashboard by hildobby.
I hope this article was useful in getting you started with blockchain analytics. Feel free to reach out if you have any questions or comments. Twitter | LinkedIn
Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing