Skip to content
Dune Analytics

@HanSolar / [Snowswap] Historic yDAI/yUSDC/yUSDT/yTUSD Pool Deposits and Withdrawals

[Snowswap] Historic yDAI/yUSDC/yUSDT/yTUSD Pool Deposits and Withdrawals

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

1SELECT 
2    date_trunc('day', evt_block_time) as DATE,
3    SUM(DEPOSIT) as DEPOSIT,
4    SUM(WITHDRAWAL) as WITHDRAWAL
5FROM 
6    (SELECT 
7        evt_block_time, 
8        VALUE*3.0158/1e18 AS VALUE,
9        CASE WHEN "from" = '\x0000000000000000000000000000000000000000' THEN VALUE*3.0158/1e18 ELSE NULL
10        END AS DEPOSIT,
11        CASE WHEN "to" = '\x0000000000000000000000000000000000000000' THEN -1*VALUE*3.0158/1e18 ELSE NULL
12        END AS WITHDRAWAL
13    FROM erc20."ERC20_evt_Transfer"
14    WHERE contract_address = '\x173f8ee61c0fe712cae2a2fc8d5c0ccdda57e6da'
15    ) a
16GROUP BY date_trunc('day', evt_block_time)
17ORDER BY  DATE asc
18

SQL query results

Loading