Skip to content
Dune Analytics

@ashachaf / Bancor fees paid per token last 24 hours

Bancor fees paid per token last 24 hours

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

1SELECT date_trunc('hour', evt_block_time),
2p.symbol,
3SUM(("conversionFee")/10^t.decimals * p.price) as fee_paid_usd
4FROM bancor."BancorConverterWithFee_evt_Conversion" b
5LEFT JOIN (SELECT
6                minute,
7                contract_address,
8                symbol,
9                price AS price
10            FROM
11                prices.usd
12            WHERE
13                minute > now() - interval '24 hours'
14                --AND minute < date_trunc('day', now())
15            GROUP BY
16                1,
17                2,
18                3
19                UNION
20                SELECT generate_series(now() - interval '24 hours', now(), '1 minute'),
21                '\x6B175474E89094C44Da98b954EedeAC495271d0F'::bytea as contract_address, 'DAI' AS symbol, 1 as price
22                UNION
23                 SELECT generate_series(now() - interval '24 hours', now(), '1 minute'),
24                '\x309627af60F0926daa6041B8279484312f2bf060'::bytea as contract_address, 'USDB' AS symbol, 1 as price
25                ...