adriaparcerisasCurrent pool numbers
Updated 2024-11-06
999
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
›
⌄
-- luvi=sqrt(asset_depth*rune_depth)/pool_units
-- Asset Depth: The amount of non-RUNE assets in the liquidity pool (eg. Number of BTC)
-- Rune Depth: The amount of RUNE in the liquidity pool
-- Pool Units: Liquidity Units + Synth Units
-- Liquidity Units: A unit representing a share of the underlying assets composing a Liquidity Pool (RUNE and ASSET)
-- Synth Units: The total number of liquidity units that are needed to redeem all of the corresponding Synthetic Asset to the pool
WITH
pool_start as (
select asset as pool_name,
day,
ROW_NUMBER() OVER (PARTITION BY pool_name order BY day) AS rn
from thorchain.defi.fact_pool_block_statistics
where swap_volume > 0
),
first_7_days as (
select pool_name,
MAX(day) AS start_threshold
from pool_start
where rn < 7
GROUP BY 1
),
debuts as (
select distinct asset as pool_name,
'{{starting_date}}'::date as starting_date,
'{{ending_date}}'::date as ending_date,
min(day)::date as debut,
case when debut>starting_date then debut else starting_date end as first_date,
cast(datediff('day',first_date,ending_date) as integer) as difference
from thorchain.defi.fact_pool_block_statistics s
join first_7_days f ON f.pool_name = s.asset and f.start_threshold < s.day
group by 1
),
numbers as (
SELECT
day as date,
case when asset like '%-%' then
QueryRunArchived: QueryRun has been archived