Skip to content
Dune Analytics

@Brecht / DEX by volume last 24 hours + Loopring

Market share 🍰DEX by volume last 24 hours + Loopring

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--DROP FUNCTION dune_user_generated.decodeFloat;
2--DROP FUNCTION dune_user_generated.process;
3--DROP TYPE dune_user_generated.trade_struct;
4
5CREATE TYPE dune_user_generated.trade_struct AS (
6    block_timestamp timestamptz,
7    tokenA integer,
8    fillA double precision,
9    tokenB integer,
10    fillB double precision,
11    accountA integer,
12    accountB integer, 
13    protocolFeeTakerBips double precision,
14    protocolFeeMakerBips double precision
15);
16
17CREATE OR REPLACE FUNCTION dune_user_generated.decodeFloat(data bytea) RETURNS double precision AS $$
18DECLARE
19    exponent integer;
20    mantissa integer;
21    value integer;
22BEGIN
23    value = get_byte(data, 0) * 65536 + get_byte(data, 1) * 256 + get_byte(data, 2);
24    exponent = value / 524288;
25    mantissa = value - (exponent * 524288);...

SQL query results

Loading