DAY | WETH_BAL | USDC_BAL | |
---|---|---|---|
1 | 2024-02-01 00:00:00.000 | 48927910.8246308 | 49567494.6042732 |
2 | 2024-01-31 00:00:00.000 | 50172232.9324741 | 49370825.7686249 |
3 | 2024-01-30 00:00:00.000 | 49775062.3264664 | 50073349.8814478 |
4 | 2024-01-29 00:00:00.000 | 48830765.3520491 | 49791155.3096283 |
5 | 2024-01-28 00:00:00.000 | 49522794.8079717 | 49076606.6788836 |
6 | 2024-01-27 00:00:00.000 | 49189483.3443227 | 49269909.3182096 |
7 | 2024-01-26 00:00:00.000 | 48573441.462149 | 49221399.6149889 |
8 | 2024-01-25 00:00:00.000 | 48507474.4158312 | 48685819.2737904 |
9 | 2024-01-24 00:00:00.000 | 48754992.3127402 | 48793585.1114966 |
10 | 2024-01-23 00:00:00.000 | 49335203.9881243 | 48870982.8982839 |
11 | 2024-01-22 00:00:00.000 | 51443870.0991424 | 49576174.3686867 |
12 | 2024-01-21 00:00:00.000 | 51562627.1530541 | 51164397.2859019 |
13 | 2024-01-20 00:00:00.000 | 51439217.4772575 | 51268980.4827887 |
14 | 2024-01-19 00:00:00.000 | 51185117.3668088 | 51483108.8133505 |
15 | 2024-01-18 00:00:00.000 | 52031691.9172229 | 51236432.0356901 |
16 | 2024-01-17 00:00:00.000 | 52457496.6075314 | 51828007.7372323 |
17 | 2024-01-16 00:00:00.000 | 51583319.5706226 | 52550042.3321883 |
18 | 2024-01-15 00:00:00.000 | 51886376.9827576 | 51744699.057758 |
19 | 2024-01-14 00:00:00.000 | 52771092.7970405 | 51330085.1465315 |
20 | 2024-01-13 00:00:00.000 | 49001464.0444949 | 49554897.8901867 |
KeyrockUniV2 -- usdc/weth TVL Overtime --backup
Updated 2024-02-01
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
›
⌄
⌄
/* Extract and categorize transfers involving weth (weth)
('0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc') -- pool
Token0 ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'), -- weth
Token1 ('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48') -- usdc
)
*/
WITH transfers AS (
SELECT
BLOCK_TIMESTAMP,
CASE
WHEN tr.contract_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' -- token 1
AND tr.to_address = '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc' THEN TRY_CAST(raw_amount_precise AS DOUBLE) -- pool addy
WHEN tr.contract_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' -- token 1
AND tr.from_address = '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc' THEN - TRY_CAST(raw_amount_precise AS DOUBLE) -- pooly addy
END AS weth
FROM
ethereum.core.fact_token_transfers AS tr
WHERE
(
tr.to_address = '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc' -- pool addy
)
OR (
tr.from_address = '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc' -- pool addy
)
AND tr.contract_address IN (
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' -- token 1
)
),
-- Group and sum weth transfers by date
grouped_transfers AS (
SELECT
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS evt_date,
SUM(weth) AS weth
FROM
Last run: over 1 year ago
...
1127
68KB
23s