mucryptoTVL Market Share 2024-04-04 08:36 PM
Updated 2024-05-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
28
29
30
31
32
33
34
35
36
›
⌄
with resps as
(select defillama.get('/v2/historicalChainTvl', {}) as resp),
figure as (
select
value:date::timestamp as date,
value:tvl as tvl
from resps,
lateral flatten (input => resp:data)
order by date desc
limit 1),
protocols as
(select defillama.get('/protocols', {}) as resp),
Liquidity_manager_tvl as (
select
value:category as category,
sum(value:tvl) as combined_Liquidity_manager_tvl
from protocols,
lateral flatten (input => resp:data)
where category = 'Liquidity manager'
group by 1)
select
'Liquidity manager' as name,
tvl,
cast(combined_Liquidity_manager_tvl / tvl * 100 as decimal(38,2)) as "TVL MARKET SHARE"
from figure
inner join Liquidity_manager_tvl
union all
select
'Rest of DeFi' as name,
combined_Liquidity_manager_tvl as tvl,
QueryRunArchived: QueryRun has been archived