Skip to content
Dune Analytics

@Brecht / Loopring Average Cost Transaction (last 24 hours)

CounterLoopring Average Cost Transaction (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

1WITH loopring_transactions_all AS(
2SELECT call_tx_hash as tx_hash, c."blockSize" as block_size
3FROM loopring."DEXBetaV1_call_commitBlock" c
4UNION
5SELECT call_tx_hash as tx_hash, 0 as block_size
6FROM loopring."DEXBetaV1_call_verifyBlocks"
7),
8loopring_transactions AS(
9SELECT l.*, tx.block_time as block_time, tx.gas_price as gas_price, tx.gas_used as gas_used
10FROM loopring_transactions_all l
11INNER JOIN ethereum.transactions tx ON tx.hash = l.tx_hash
12WHERE tx.block_time > now() - interval '1 days'
13)
14SELECT sum(b.gas_used * b.gas_price)/1e18 * (SELECT price FROM prices.usd WHERE symbol = 'WETH' ORDER BY minute desc LIMIT 1) / sum(b.block_size) as "average cost"
15FROM loopring_transactions b;

SQL query results

Loading