DATE | Inflow | Outflow | NET $ | TVL | |
---|---|---|---|---|---|
1 | 2025-04-02 00:00:00.000 | 107999.581222441 | -110460.3912999 | -2460.810077459 | 3138931.17516533 |
2 | 2025-04-01 00:00:00.000 | 105707.453609 | -49563.8654069 | 56143.5882021 | 3141391.98524279 |
3 | 2025-03-31 00:00:00.000 | 32406.098465356 | -138013.4486481 | -105607.350182744 | 3085248.39704069 |
4 | 2025-03-30 00:00:00.000 | 47191.1809404 | -25690.0908453 | 21501.0900951 | 3190855.74722343 |
5 | 2025-03-29 00:00:00.000 | 104312.9114409 | -36648.7168766 | 67664.1945643 | 3169354.65712833 |
6 | 2025-03-28 00:00:00.000 | 249347.6776085 | -267345.6174597 | -17997.9398512 | 3101690.46256403 |
7 | 2025-03-27 00:00:00.000 | 96866.4894855 | -37620.332141478 | 59246.157344022 | 3119688.40241523 |
8 | 2025-03-26 00:00:00.000 | 128566.032675858 | -119639.5352864 | 8926.497389458 | 3060442.24507121 |
9 | 2025-03-25 00:00:00.000 | 31218.9524875 | -75866.1596303 | -44647.2071428 | 3051515.74768175 |
10 | 2025-03-24 00:00:00.000 | 31580.34483375 | -31081.853422075 | 498.491411675 | 3096162.95482455 |
11 | 2025-03-23 00:00:00.000 | 296278.025072632 | -267690.3320016 | 28587.693071033 | 3095664.46341288 |
12 | 2025-03-22 00:00:00.000 | 97151.3185806 | -110622.830269 | -13471.5116884 | 3067076.77034185 |
13 | 2025-03-21 00:00:00.000 | 23884.5 | -2726.9263853 | 21157.5736147 | 3080548.28203025 |
14 | 2025-03-20 00:00:00.000 | 382102.306809856 | -302564.49778882 | 79537.809021036 | 3059390.70841555 |
15 | 2025-03-19 00:00:00.000 | 106300.970965528 | -58685.297404309 | 47615.673561219 | 2979852.89939451 |
16 | 2025-03-18 00:00:00.000 | 54566.915837984 | -16215.023794338 | 38351.892043647 | 2932237.22583329 |
17 | 2025-03-17 00:00:00.000 | 9595.8599999 | -5732.12 | 3863.7399999 | 2893885.33378965 |
18 | 2025-03-16 00:00:00.000 | 317054.1193896 | -266482.7091514 | 50571.4102382 | 2890021.59378975 |
19 | 2025-03-15 00:00:00.000 | 26815.5999999 | -2377.47 | 24438.1299999 | 2839450.18355155 |
20 | 2025-03-14 00:00:00.000 | 37967.070628338 | -23828.0110544 | 14139.059573937 | 2815012.05355165 |
Sbhn_NPcurious-coral
Updated 5 days ago
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 price as (
select hour::date as datee,
avg(price) as usdprice
from stellar.price.ez_prices_hourly
where symbol = 'XLM'
group by 1
),
inflows AS (
SELECT DATE_TRUNC('day', block_timestamp) AS date,
SUM(
CASE
WHEN COALESCE(details_json:asset_balance_changes[0]:asset_code::STRING, 'XLM') = 'XLM'
THEN details_json:asset_balance_changes[0]:amount * usdprice
ELSE details_json:asset_balance_changes[0]:amount
END
) AS total_inflow
FROM stellar.core.ez_operations
JOIN stellar.core.fact_contract_events USING(transaction_hash)
LEFT JOIN price ON DATE_TRUNC('day', block_timestamp) = datee
WHERE details_json:asset_balance_changes[0]:to = 'CDVQVKOY2YSXS2IC7KN6MNASSHPAO7UN2UR2ON4OI2SKMFJNVAMDX6DP'
AND details_json:asset_balance_changes[0]:type = 'transfer'
AND topics_decoded:topics_decoded[0]:value IN ('supply_collateral', 'repay')
and date >= '2025-01-01'
GROUP BY 1
),
outflows AS (
SELECT
DATE_TRUNC('day', block_timestamp) AS date,
SUM(
CASE
WHEN COALESCE(details_json:asset_balance_changes[0]:asset_code::STRING, 'XLM') = 'XLM'
THEN details_json:asset_balance_changes[0]:amount * usdprice
ELSE details_json:asset_balance_changes[0]:amount
END
Last run: 5 days ago
83
7KB
29s