SniperDAILY DEPOSIT AND WITHDRAW
Updated 2022-11-16
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
›
⌄
with LP as ( select
Date(block_timestamp::date) date,
tx_hash,
LP_TOKEN_AMOUNT_USD as amt,
lp_action
from optimism.velodrome.ez_lp_actions
where lp_action in ('deposit', 'withdraw'))
select lp_action as action,
date,
count(DISTINCT tx_hash) as total_tx,
sum(amt) as total_amt,
sum(total_tx) over (order by date asc) as cum_tx,
sum(total_amt) over (order by date asc) as cum_amt
from LP
where lp_action = 'deposit'
group by 1,2
UNION
select 'withdraw' as status,
date,
count(DISTINCT tx_hash) as total_tx,
sum(amt) as total_amt,
sum(total_tx) over (order by date asc) as cum_tx,
sum(total_amt) over (order by date asc) as cum_amt
from LP
where lp_action = 'withdraw'
group by 1 ,2
Run a query to Download Data