AurelianLabsUser Add LP Action <> Gas Fee Correlation Coefficient
Updated 2024-07-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH pools AS (
SELECT
tx_hash,
contract_address AS pool_address
FROM base.core.ez_decoded_event_logs
WHERE event_name = 'Mint'
AND block_timestamp::date >= '2024-03-01'
AND decoded_log:owner IS NOT NULL
),
add_liq AS (
SELECT
a.block_timestamp::date AS date,
a.tx_hash,
decoded_log:"amount0" AS amount0,
decoded_log:"amount1" AS amount1,
symbols:"token0" AS token0,
symbols:"token1" AS token1,
decimals:"token0" AS decimals0,
decimals:"token1" AS decimals1,
b.pool_address,
c.pool_name
FROM base.core.ez_decoded_event_logs a
LEFT JOIN pools b ON a.tx_hash = b.tx_hash
LEFT JOIN base.defi.dim_dex_liquidity_pools c ON b.pool_address = c.pool_address
WHERE contract_name ILIKE '%uniswap%'
AND event_name ILIKE 'Increaseliquidity'
AND a.block_timestamp::date BETWEEN '2024-03-01' AND '2024-05-01'
),
user_add_liq AS (
SELECT
block_timestamp::date AS date,
origin_from_address AS users,
COUNT(DISTINCT tx_hash) AS lp_action
FROM base.core.ez_decoded_event_logs
QueryRunArchived: QueryRun has been archived