CryptoIcicleOptimism-10.Velodrome Health - Liquidity
Updated 2022-08-14
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
›
⌄
-- Velodrome Health
-- Q10. Create 3 dashboards on Velodrome with a description for each that showcase traction and success in a data-driven manner.
-- Most importantly, your insights should help our readers answer the question "How healthy is this project?"
-- Payout 150 USDC
-- Grand Prize 450 USDC
-- Payout Network Ethereum
-- Level Advanced
-- Difficulty Elite
with lp_txns as (
select
*
from optimism.velodrome.ez_lp_actions
)
select
date_trunc('{{date_range}}',block_timestamp) as date,
pool_name as pair,
lp_action,
count(distinct tx_hash) as n_lp_txns,
count(distinct sender_address) as n_wallets,
sum(coalesce(lp_token_amount_usd, 0)) as lp_token_amount_usd_total,
iff(lp_action = 'deposit',lp_token_amount_usd_total, -1 * lp_token_amount_usd_total) as lp_amount_usd,
sum(lp_amount_usd) over (partition by pool_name order by date asc rows between unbounded preceding and current row) as cum_lp_amount_usd
from lp_txns
where block_timestamp >= CURRENT_DATE - {{n_days}}
group by 1, 2, 3
Run a query to Download Data