Skip to content
Dune Analytics

@k06a / 1inch USD REF Volume Per Week

1inch USD REF Volume Per Week

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    time,
3    volume
4FROM (
5SELECT
6    date_trunc('{{period}}', tx.block_time) AS time,
7    MAX(tx.block_time) AS last_time,
8    SUM(
9        GREATEST(
10            oi."fromAmount" * (
11                CASE
12                    WHEN oi."fromToken" IN (
13                        '\xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', -- ETH
14                        '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', -- WETH
15                        '\x5e74c9036fb86bd7ecdcb084a0673efc32ea31cb', -- sETH
16                        '\x3a3a65aab0dd2a17e3f1947ba16138cd37d08c04', -- aETH
17                        '\xc0829421c1d260bd3cb3e0f06cfe2d52db2ce315'  -- BETH
18                    ) THEN (
19                        SELECT p.price
20                        FROM prices."layer1_usd" p
21                        WHERE p.symbol = 'ETH'
22                        AND p.minute = date_trunc('minute', tx.block_time)
23                        LIMIT 1
24                    )
25                    WHEN oi."fromToken" IN (...

SQL query results

Loading