Skip to content
Dune Analytics

@p0s / Gas Per Trade - DEXs (7 Day)

Gas Per Trade - DEXs (7 Day)

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
2    CASE 
3        WHEN fee_recipient_address IN ('\x6f7ae872e995f98fcd2a7d3ba17b7ddfb884305f'::BYTEA,'\xb9e29984fe50602e7a619662ebed4f90d93824c7'::BYTEA) THEN 'Tokenlon'
4        WHEN project = '0x' THEN '0x (ex Tokenlon)'
5        ELSE project
6    END AS "Project",
7avg(gas_used) as av_gas_used_per_tx
8FROM dex."trades" t                                                                                    
9LEFT JOIN zeroex.view_fills z ON t.tx_hash = z.transaction_hash AND z.fee_recipient_address IN ('\x6f7ae872e995f98fcd2a7d3ba17b7ddfb884305f'::BYTEA,'\xb9e29984fe50602e7a619662ebed4f90d93824c7'::BYTEA)
10LEFT JOIN ethereum."traces" tx ON t.tx_hash = tx.tx_hash
11WHERE tx.block_time > date_trunc('day', now()::timestamptz - interval '6 day') 
12AND t.block_time > date_trunc('day', now()::timestamptz - interval '6 day') 
13AND tx.success = 'true'
14AND "project" != 'Loopring'
15GROUP BY 1
16ORDER BY 2 desc
17;
18