Afonso_DiazUniswap and Maverick Pool Stats
Updated 2024-05-05
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
maverick1 as (
select
tx_hash,
block_timestamp,
origin_from_address as liquidity_provider,
'0x6c6fc818b25df89a8ada8da5a43669023bad1f4c' as pool_address,
iff(decoded_log:from = pool_address, 'DECREASE_LIQUIDITY', 'INCREASE_LIQUIDITY') as action,
iff(contract_address = '0x5f98805a4e8be255a32880fdec7f6728c6568ba0', 'LUSD', 'USDC') as symbol,
decoded_log:value/iff(symbol = 'USDC', 1e6, 1e18) as amount,
amount as amount_usd
from ethereum.core.ez_decoded_event_logs
where contract_address in ('0x5f98805a4e8be255a32880fdec7f6728c6568ba0', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')
and event_name = 'Transfer'
and '0x6c6fc818b25df89a8ada8da5a43669023bad1f4c' in (decoded_log:from, decoded_log:to)
and tx_status = 'SUCCESS'
and not tx_hash in (
select distinct tx_hash from ethereum.core.ez_decoded_event_logs
where event_name = 'Transfer'
and decoded_log:from = '0x6c6fc818b25df89a8ada8da5a43669023bad1f4c'
and tx_hash in (
select distinct tx_hash from ethereum.core.ez_decoded_event_logs
where event_name = 'Transfer'
and decoded_log:to = '0x6c6fc818b25df89a8ada8da5a43669023bad1f4c'
)
)
),
maverick as (
select
tx_hash,
block_timestamp,
liquidity_provider,
pool_address,
action,
QueryRunArchived: QueryRun has been archived