DAY | ASSET | ASSET_CHANGE | ASSET_CHANGE_USD | CUMULATIVE_DEPTH | CUMULATIVE_DEPTH_USD | CUMULATIVE_TOTAL_DEPTH_USD | |
---|---|---|---|---|---|---|---|
1 | 2025-02-18 00:00:00.000 | BNB/BNB | 0 | 0 | 4844.61615036 | 3083558.93909959 | 89554088.9242453 |
2 | 2025-02-18 00:00:00.000 | GAIA/ATOM | 0 | 0 | 39253.93667635 | 190985.261017017 | 89554088.9242453 |
3 | 2025-02-18 00:00:00.000 | AVAX/AVAX | 0 | 0 | 39608.36133855 | 994284.962021307 | 89554088.9242453 |
4 | 2025-02-18 00:00:00.000 | LTC/LTC | 0 | 0 | 25622.79075001 | 3364168.99928095 | 89554088.9242453 |
5 | 2025-02-18 00:00:00.000 | DOGE/DOGE | 0 | 0 | 12239813.238231 | 3213018.9139082 | 89554088.9242453 |
6 | 2025-02-18 00:00:00.000 | BTC/BTC | 0 | 0 | 539.20956133 | 53313264.1371892 | 89554088.9242453 |
7 | 2025-02-18 00:00:00.000 | Stablecoin | 0 | 0 | 9954934.59847981 | 9947860.03741842 | 89554088.9242453 |
8 | 2025-02-18 00:00:00.000 | ETH/ETH | 0 | 0 | 4879.99753751 | 13580590.3724996 | 89554088.9242453 |
9 | 2025-02-18 00:00:00.000 | BCH/BCH | 0 | 0 | 5602.82196552 | 1866357.30181108 | 89554088.9242453 |
10 | 2025-02-10 00:00:00.000 | AVAX/AVAX | 0 | 0 | 39608.36133855 | 1049622.08518494 | 89882984.4962765 |
11 | 2025-02-10 00:00:00.000 | BTC/BTC | 0 | 0 | 539.20956133 | 54202608.3535086 | 89882984.4962765 |
12 | 2025-02-10 00:00:00.000 | DOGE/DOGE | 0 | 0 | 12239813.238231 | 3193701.21359912 | 89882984.4962765 |
13 | 2025-02-10 00:00:00.000 | GAIA/ATOM | 0 | 0 | 39253.93667635 | 193087.788022485 | 89882984.4962765 |
14 | 2025-02-10 00:00:00.000 | BCH/BCH | 0 | 0 | 5602.82196552 | 1929789.95600636 | 89882984.4962765 |
15 | 2025-02-10 00:00:00.000 | ETH/ETH | 0 | 0 | 4879.99753751 | 13367172.6852965 | 89882984.4962765 |
16 | 2025-02-10 00:00:00.000 | LTC/LTC | 0 | 0 | 25622.79075001 | 3106584.48089198 | 89882984.4962765 |
17 | 2025-02-10 00:00:00.000 | BNB/BNB | 0 | 0 | 4844.61615036 | 2896417.40669312 | 89882984.4962765 |
18 | 2025-02-10 00:00:00.000 | Stablecoin | 0 | 0 | 9954934.59847981 | 9944000.52707333 | 89882984.4962765 |
19 | 2025-02-07 00:00:00.000 | Stablecoin | 0 | 0 | 9954934.59847981 | 9946983.73770682 | 89840951.2173751 |
20 | 2025-02-07 00:00:00.000 | LTC/LTC | 0 | 0 | 25622.79075001 | 2803809.42220554 | 89840951.2173751 |
kaleb0xSavers Depth USD
Updated 2025-02-21
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 daily_saver_depth AS (SELECT to_date(block_timestamp) as day,
pool_name AS asset,
avg(POWER(10,-8) * asset_e8) AS cumulative_depth
FROM thorchain.defi.fact_block_pool_depths
WHERE (pool_name LIKE '%/%')
GROUP BY day, asset),
savers_change AS (SELECT *, cumulative_depth - coalesce(lag(cumulative_depth) over (order by asset, day), 0) as asset_change
from daily_saver_depth),
prices AS (SELECT to_date(block_timestamp) as day, avg(asset_usd) as asset_usd, REPLACE(pool_name, '.', '/') as asset
from thorchain.price.fact_prices group by day, asset order by day DESC),
joined AS (SELECT a.day, a.asset, a.asset_change, asset_usd * a.asset_change as asset_change_usd,
a.cumulative_depth, asset_usd * a.cumulative_depth as cumulative_depth_usd
FROM savers_change as a left join prices as b on a.day = b.day and a.asset = b.asset),
asset_names AS (SELECT day, sum(asset_change) as asset_change,
sum(asset_change_usd) as asset_change_usd, sum(cumulative_depth) as cumulative_depth, sum(cumulative_depth_usd) as cumulative_depth_usd,
CASE
WHEN asset = 'BSC/BNB' THEN 'BNB/BNB'
WHEN asset = 'ETH/USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48' THEN 'Stablecoin'
WHEN asset = 'AVAX/USDC-0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E' THEN 'Stablecoin'
WHEN asset = 'BNB/BUSD-BD1' THEN 'Stablecoin'
WHEN asset = 'BSC/USDC-0X8AC76A51CC950D9822D68B83FE1AD97B32CD580D' THEN 'Stablecoin'
WHEN asset = 'ETH/DAI-0X6B175474E89094C44DA98B954EEDEAC495271D0F' THEN 'Stablecoin'
WHEN asset = 'ETH/GUSD-0X056FD409E1D7A124BD7017459DFEA2F387B6D5CD' THEN 'Stablecoin'
WHEN asset = 'ETH/LUSD-0X5F98805A4E8BE255A32880FDEC7F6728C6568BA0' THEN 'Stablecoin'
WHEN asset = 'ETH/USDP-0X8E870D67F660D95D5BE530380D0EC0BD388289E1' THEN 'Stablecoin'
WHEN asset = 'ETH/USDT-0XDAC17F958D2EE523A2206206994597C13D831EC7' THEN 'Stablecoin'
ELSE asset END as asset2
FROM joined GROUP BY day, asset2)
SELECT day, asset2 as asset, asset_change,asset_change_usd, cumulative_depth, cumulative_depth_usd,
SUM(cumulative_depth_usd) OVER(PARTITION BY day ORDER BY day) as cumulative_total_depth_usd
FROM asset_names WHERE day is not null
Last run: 2 months ago
...
7043
804KB
7s