Everipedia Logo
Everipedia is now IQ.wiki - Join the IQ Brainlist and our Discord for early access to editing on the new platform and to participate in the beta testing.
Dune Analytics

Dune Analytics

Dune Analytics - How to analyse DeFi data in minutes with SQL on human-readable data

Dune Analytics - How to analyse DeFi data in minutes with SQL on human-readable data

Dune Analytics (founded 2018) is a privately held organization which currently allows anyone to easily create analysis from smart contract data, visualize it, and share it with the world.[2]

There are several high profile Ethereum teams using Dune, but also various community members.

BackStory

Dune's co-founder Mats Julian Olsen

Dune's co-founder Mats Julian Olsen

Dune's co-founder Fredrik Haga

Dune's co-founder Fredrik Haga

Dune Analytics was started by Fredrik Haga and Mats Julian Olsen in 2018 at Oslo, Norway.

Dune is the all-in-one platform to query, visualize, share, and explore human-readable smart contract data.

It is trusted and used by a lot of companies like Gnosis, Compound, and Bancor.

In an interview Fredrik revealed the inspiration behind Dune Analytics, he said

"Mats and I used to work together on blockchain experiments at a company called Schibsted Media Group that does newspapers and online classifieds (like eBay in various markets around the world). "[2]

"After some time, we realized that crypto was probably a little too immature and risky for Schibsted to take a proper bet on it.

We were (and are:)) both firm believers in blockchain technology and figured it was time to dedicate ourselves to a blockchain future fully.

"[2]

"We had already built some smart contract proof of concepts and used a bunch of dApps, so we had a good idea of the various problems in the space.

Mats used to build machine learning products while I have a background in statistics and startup analytics, so we soon realized that the data realm was where our experience was most valuable."[2]

He also added

"We’ve always been very focused on building something useful, and we think customers are the very best attestation of that.

We delivered to Dharma as our first client only three months after we went full time, which was cool.

We have to give a shoutout to Nadav and Brendan at Dharma that took a bet on us and became our first customer so early.

"

"On the tech side, getting all the data correctly and consistently from the blockchain is much much harder than a lot of people think it is.

So a considerable part of the work is getting that right.

We’ve also gone through quite a few iterations to get our decoded data into the best possible format.

"

He also talked about their present accomplishment

"What we’re excited about now is the community version.

Allowing anyone to create any form of analysis with SQL easily, turn it into a dashboard, and then share it with others.

We think this will help a lot of discussions and decisions across the community going forward."

How to Use Dune Analytics

Dune's Queries page

Dune's Queries page

Image

To create queries an account is needed.

It is free to create an account and If you want direct API access or make private queries you’ll need to sign up for the premium solution.

[3]

After creating an account, on the main page, one can start exploring existing queries by clicking Queries on the top left.

There the latest public queries that were created by others can be seen.[3]

From this page, one can explore queries by the latest or choose a tag that seems interesting.

Dune Analytics offers access to raw Ethereum data like block, logs (events), transactions, receipts, traces (contract messages). And also decoded data like ERC20 transfers and other specific protocol data.[3]

This query uses the raw log data to find out the ERC20 transfers of the BAT token.

To understand how this query works, the anatomy of a transfer event emitted by ERC20 contracts has to be understood.

The event looks like this:

event Transfer(address indexed from, address indexed to, uint256 value);

Which means that when the event is emitted during a token transfer There will be a log table row containing:

contract_address: the address of the ERC20 token

topic1: The hash of the encoded contract (Read here how it works) For ERC20 the hash is 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

topic2: the first indexed parameter from

topic3: the second indexed parameter to

data: The raw data of the event, in our case the last parameter which is the amount of token sent (value).

Note that in a lot of platforms the hash of the log is considered as topic0 but on Dune Analytics it is topic1.

About the Co-founders

Fredrik Haga is a 28-year-old Norwegian economist who had always had a great interest in technology.

According to him, he fell down the crypto rabbit hole in 2015 when he heard a podcast episode with Nathaniel Popper (author of Digital Gold) on EconTalk. The podcast had a lot of good conversations on all kinds of topics with domain experts.[2]

He is also a freestyle skier, hip-hop fan, and definitely a crypto geek.

Mats Julian Olsen was formerly the co-founder of The Data Science DAO and also worked as a senior data scientist with Schibste Media Group for almost 3 years before coming together to create Dune Analytics with Fredrick in 2018.

Top Teams using Dune Analytics

References

[1]
Citation Linktwitter.com
Jul 12, 2020, 6:32 PM
[2]
Citation Linkdefiprime.com
Jul 12, 2020, 6:46 PM
[3]
Citation Linkethereumdev.io
Jul 12, 2020, 8:05 PM
[4]
Citation Linkmedium.com
Jul 12, 2020, 8:06 PM
[5]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune's co-founder Fredrik Haga
Jul 12, 2020, 8:43 PM
[6]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.com
Jul 12, 2020, 8:43 PM
[7]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune
Jul 12, 2020, 8:44 PM
[8]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune's co-founder Mats Julian Olsen
Jul 12, 2020, 8:45 PM
[9]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comFedrik Haga
Jul 12, 2020, 8:46 PM
[10]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune's Analytics
Jul 12, 2020, 8:47 PM
[11]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.com
Jul 12, 2020, 8:48 PM
[12]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comFredrik and Mats
Jul 12, 2020, 8:49 PM
[13]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune's co-founder Mats Julian Olsen
Jul 12, 2020, 8:51 PM
[14]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.comDune's Queries page
Jul 12, 2020, 8:54 PM
[15]
Citation Linkywqaugeunhowzrcj.public.blob.vercel-storage.com
Jul 12, 2020, 8:55 PM
[16]
Citation Linkyoutu.beDune Analytics - How to analyse DeFi data in minutes with SQL on human-readable data
Jul 12, 2020, 9:06 PM