Skip to content
Dune Analytics

@pengiundev / Curve.fi trade sources

Curve.fi trade sources

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

1;with intermediate_results(totalsum, buyer) AS (
2    select 
3    sum(tokens_sold/(case 
4    when sold_id = 0 then 1e18
5    when sold_id = 1 then 1e6
6    end)) as totalsum,
7    buyer
8    from curvefi."compound_v2_evt_TokenExchangeUnderlying" as cst
9    GROUP BY buyer
10
11    
12    union
13    
14
15    select
16    sum(tokens_sold/(case 
17    when sold_id = 0 then 1e18
18    when sold_id = 1 then 1e6
19    end)) as totalsum,
20    buyer
21    from curvefi."compound_v3_evt_TokenExchangeUnderlying" as cst
22    GROUP BY buyer
23
24    union
25    ...

SQL query results

Loading