Skip to content
Dune Analytics

@jebonn / Uniswap_v2 fees

Daily fees paid per tokenUniswap_v2 fees


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


SQL query

1-- Get token and pair information from tokens symbols
2WITH tmp_token0 AS
3  (-- Temporary values as real tokens order is not yet known
4 SELECT contract_address
5   FROM erc20."tokens"
6   WHERE symbol='{{symbol0}}' ),
7     tmp_token1 AS
8  (SELECT contract_address
9   FROM erc20."tokens"
10   WHERE symbol='{{symbol1}}'),
11     pair AS -- Get UNISWAP pair information
12  (SELECT pair,
13          token0,
14          token1
15   FROM uniswap_v2."Factory_evt_PairCreated"
16   WHERE (token0=
17            (SELECT contract_address
18             FROM tmp_token0)
19          AND token1=
20            (SELECT contract_address
21             FROM tmp_token1))
22     OR (token1=
23           (SELECT contract_address
24            FROM tmp_token0)
25         AND token0=...