Skip to content
Dune Analytics

@hagaetc / DefiPulse Index (DPI) token balance over time

DefiPulse Index (DPI) token balance over time

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query results

Loading
 

SQL query

1WITH transfers AS (
2    
3    SELECT  day,
4            address, 
5            token_address, 
6            sum(amount) AS amount -- Net inflow or outflow per day
7    FROM
8    
9    (
10        SELECT  date_trunc('day', evt_block_time) AS day,
11                "to" AS address,
12                tr.contract_address AS token_address,
13                value AS amount
14        FROM erc20."ERC20_evt_Transfer" tr
15        WHERE "to" = '\x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b' --Filter for holding address
16        -- AND contract_address = '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' -- Filter for token address if you only want to see a specific token
17        
18        UNION ALL
19        
20        SELECT  date_trunc('day', evt_block_time) AS day,
21                "from" AS address,
22                tr.contract_address AS token_address,
23                -value AS amount
24        FROM erc20."ERC20_evt_Transfer" tr
25        WHERE "from" = '\x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b' --Filter for holding address...