Pothu Profile picture
Jul 27, 2022 32 tweets 10 min read Read on X
Dune Analytics might be the best place to find real-time alpha for free.

It’s home to thousands of free dashboards that display crypto data.

When used correctly, this data can make you rich.

Here’s your guide to Dune Analytics 🧵
Dune Analytics makes it easy to view and understand on-chain data.

In this guide I’ll cover:
• Community dashboards
• Extracting data with queries
• Creating visualizations
• Creating your own dashboard
1. Community dashboards

The easiest way to use Dune is to look at dashboards that others have created.

You can search for specific dashboards and filter them with tags such as DeFi, NFTs, and Ethereum.
When you’re looking for information about a specific project, dashboards and queries by other Dune users are probably the best places to start.

Take a look at all the Uniswap dashboards available:
Let’s take a look at a DEX metrics dashboard by @hagaetc.

We can see some useful stats about DEXs.

There are also some great charts and visualizations related to DEX volume and market share.
You can select an individual query in a dashboard to view more information about it.

Let’s take a look at the Market share one:
We now see more information about the query.

We can see the query's PostgresSQL code.

We can also see the associated views with the query.
You can run the query to get updated metrics on the dashboard.

You can also fork the dashboard.

Forking will allow you to edit the query, fine tuning it to your requirements.
2. Extracting data with queries

Dune aggregates blockchain data into SQL databases.

SQL is a common database system. It’s a popular tool. Many large companies use it.

Users can query on-chain data using PostgreSQL (a simple coding language that lets you access SQL databases).
Here are some PostgreSQL basics:

SQL databases are organized into rows and columns (like spreadsheets).

Each row signifies a different data record. For DEXs different rows could be Uniswap or Curve.

Columns are data values of a particular type such as price or volume.
Each query returns rows or columns of data.

When creating visualizations, querying columns are most common.

Most queries are in the form:
With SELECT, we choose some data (here, we are choosing the “columnName”) FROM a table (a collection of data).

For Dune, each table contains information about a project, protocol, or chain.

Optionally, we can specify a LIMIT. This limits how many rows or columns are returned.
We can also specify a condition using WHERE. Only data records that fulfill the condition are extracted.

It’s essentially a filter.

A common use of this is to specify a contract address.

Note that names and values are case sensitive in PostgresSQL.
Let’s take a look at a simple query.

We’re going to look at the 7 days DEX volume query.
The query extracts the usd_amount column from the dex.”trades” table.

It then applies an operation to the columns we’re selecting.

It adds all the values from the column together.

This is then converted to billions. AS is used to specify a variable name for this value.
The condition narrows down the data the query extracts. Only transactions from the past week are considered.

AND is used to chain conditions. Here the second condition is the category of transaction.

Only DEX transactions.
To summarize, the query is looking at the usd amount of all DEX transactions from the past week.

This is added together and converted to billions, and displayed as a single number.
It’s good to know how queries work, but you’re rarely going to build queries from scratch.

Usually, you’ll fork someone else's query and edit it.

Dune also maintains a list of abstractions (custom tables). These abstractions give users access to more complex SQL operators.
All the abstractions are stored in a GitHub repository.

The repo is a huge collection of SQL scripts that you can build off of.

Here’s the link to the abstraction repo:

github.com/duneanalytics/…
PostgreSQL is really popular, and there are a lot of great resources out there.

The official documentation is a great place to start:

postgresql.org/docs/12/index.…

FreeCodeCamp’s crash course is great too:

3. Creating visualizations

Query results are usually hard to analyze.

Visualizations present query results in a digestible format.

Dune offers several visualization options:
• bar charts
• area charts
• scatter charts
• line charts
• pie charts
• counters
For a given query, you can create visualizations or edit existing ones.

Let’s look at the Monthly DEX Volume By Project query.

It has two visualizations: bar chart and table. You can switch between these views by clicking on them.

You can edit the view here as well.
When you create a visualization you can choose from several options.

Let’s make an pie chart to create a market share visualization.
Now we edit the chart options.

The option below means that we’re creating a pie chart where each section represents a project’s volume in usd.
In the resulting visualization we can see the market share of different DEXs over a specified time period.

This can be extrapolated. By changing a few variables we could see things like smart contract volume across different chains.

The possibilities are endless with Dune.
4. Creating custom dashboards

A dashboard is just a group of queries.

By selecting and displaying related queries together, you can get a much better understanding of a project, protocol, or ecosystem.

If you have queries, creating a custom dashboard is easy.
To start, head over to the Dune homepage and click on New dashboard:
Here you can name the dashboard and create a custom URL.

Dashboards are public by default, but pro users can limit who views their dashboards.
Click on Edit and then Add Visualization.

You have the option to add queries you’ve created as well as queries created by other users.
I added a few visualizations to a dashboard.

I created a dashboard that gives you an overview of the Ethereum NFT market.
Dune makes on-chain data accessible to all.

You can do a lot with Dune. It’s a great collaboration tool.

Dune makes it possible create powerful visualizations very quickly.

By putting the right queries together, you can turn into an on-chain wizard.
There’s a lot more to Dune, and I’ll be posting more guides soon.

If you enjoyed this one:
1. Follow me @cryptoPothu for more.
2. Give this a RT

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pothu

Pothu Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @cryptoPothu

Sep 29, 2023
We've been in a bear market for over 1 year

Surprisingly, I’m still bullish

Here's why 🧵 Image
It’s easy to forget why we got into crypto in the first place.

There are so many ways that crypto could change the world.

Crypto is already making a huge impact.
DEXs have handled nearly $800 billion in volume in just the last year.

DeFi protocols like Goldfinch and Jia are helping close the credit gap in developing countries.

There are over $155 billion of stablecoins in circulation. Image
Read 26 tweets
Apr 14, 2023
Chainlink: the decentralized oracle

Chainlink’s decentralized oracle networks provide tamper-proof inputs, outputs, and computations.

Here’s your everything guide to #Chainlink and its token $LINK 🧵 Image
Blockchains are meant to be extremely secure. Information is available to all users of the network.

But smart contracts can reintroduce counterparty risk.

/2
Many smart contracts require data from the real world (e.g flight information or asset prices) to execute commands.

This data, however, is not stored on blockchains.

/3
Read 19 tweets
Apr 3, 2023
AI is changing the way we live

Machine Learning empowers AI systems to learn from data, identify patterns, and make informed decisions

Here’s how it can give you an edge in crypto 🧵 Image
Machine learning (ML) can help us uncover hidden signals and improve our decision-making process.

In this thread, we'll explore how ML can be applied to find valuable insights in the crypto market.
We’ll cover machine learning for:

• Price Prediction
• Trading Bots
• Portfolio Management
• Sentiment Analysis
• Social Media and Network Analysis
• Anomaly Detection
Read 13 tweets
Apr 2, 2023
Crypto Twitter has all the knowledge you'll ever need

But there's so much info out there, it's easy to get lost

Here are the best threads I've come across lately that will give you the alpha you need 🧵
2. @thedefiedge on why Real World Assets will be the catalyst for mainstream adoption
Read 10 tweets
Mar 31, 2023
Crypto Regulation could be coming as soon as this year

As the crypto landscape evolves, regulation is growing in importance every day

Stay ahead of the curve by understanding the impact of regulation on crypto

Here’s everything you need to know about Crypto Regulation 🧵
In this thread:

• Why Regulation is important
• Is crypto a security or commodity?
• The SEC and digital assets
• Regulatory uncertainty
1. Why Regulation is important

Crypto regulation could make or break the industry.

Crypto bans could hinder or stop innovation altogether, but proper support and guidance could make crypto safer for all.
Read 31 tweets
Mar 25, 2023
Normally an airdrop is a fleeting narrative.

But the Arbitrum Airdrop could play a major role in shaping the Ethereum ecosystem.

Here’s everything you need to know about the Arbitrum airdrop and its market impact 🧵
The Ethereum L2 landscape is witnessing fierce competition between Arbitrum and Optimism, as both solutions vie for dominance in the space.

The recent Arbitrum airdrop has had a significant impact on the market and the competitive positioning of both platforms.
1. The Arbitrum Airdrop

The Arbitrum airdrop distributed 12.75% of the total ARB supply (1.275 billion tokens) to eligible addresses.

It has resulted in a market cap of approximately $14.13 billion.

~75% of the tokens were claimed by over 73% of eligible addresses in day one.
Read 18 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(