gaonip[Staging] Uniswap wash trades
Updated 2023-10-25
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
›
⌄
with uni_lps as (SELECT
liquidity_provider,
date_trunc('day', block_timestamp) as date
FROM
ethereum.uniswapv3.ez_positions
WHERE
date >= CURRENT_DATE - 365 and is_active = TRUE
GROUP BY
1,2
),
uni_swaps as (
SELECT
recipient,
date_trunc('day', block_timestamp) as date
FROM
ethereum.uniswapv3.ez_swaps
WHERE
date >= CURRENT_DATE - 365
)
SELECT
(SELECT
COUNT(date) as swaps_by_lp
FROM
uni_swaps
where
recipient in ((select liquidity_provider from uni_lps))
) / (
select
count(recipient) as swaps_not_by_lp
from
uni_swaps
) as ratio_swaps
Run a query to Download Data