DEPOSITOR_CATEGORY | TOTAL_BORROWERS | TOTAL_COLLATERAL | TOTAL_BORROWED | TOTAL_OPEN_TROVE_TRANSACTIONS | TOTAL_ADJUST_TROVE_TRANSACTIONS | TOTAL_TRANSACTIONS | |
---|---|---|---|---|---|---|---|
1 | 0.002-0.005 BTC | 235 | 0.767906 | 13238338.1398 | 267 | 248 | 515 |
2 | 0.1-0.5 BTC | 14 | 4.574703 | 74921853.04885 | 36 | 2 | 38 |
3 | 0.005-0.01 BTC | 97 | 0.692557 | 11902969.3537 | 109 | 134 | 243 |
4 | 0.05-0.1 BTC | 4 | 0.272929 | 4740639.36535 | 4 | 1 | 5 |
5 | 0.001-0.002 BTC | 323 | 0.440699 | 7211825.6425 | 342 | 328 | 670 |
6 | 1 BTC or more | 1 | 36.289586 | 659377994.89955 | 17 | 2 | 19 |
7 | 0.01-0.05 BTC | 55 | 1.08836 | 16796082.6514 | 66 | 209 | 275 |
8 | 0.0001-0.001 BTC | 18712 | 4.072732 | 68147004.06415 | 18755 | 1179 | 19934 |
9 | 0.5-1 BTC | 2 | 1.564964 | 28275830.4805 | 22 | 27 | 49 |
datavortextotal-lavender
Updated 4 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 open_trove AS (
SELECT
'0x' || SUBSTR(topics [1], 27) AS borrower_address,
ethereum.public.udf_hex_to_int(SUBSTRING(data, 3, 64)) :: NUMERIC / 1e18 AS open_principal,
ethereum.public.udf_hex_to_int(SUBSTRING(data, 131, 64)) :: NUMERIC / 1e18 AS open_collateral,
tx_hash
FROM
mezo.testnet.fact_event_logs
WHERE
topics [0] = '0xf575eb5cdee005607f56587351e18943ddacd11756b9d37980ec251797ff136c'
AND origin_function_signature = '0x8f09162b'
AND contract_address = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
),
adjust_trove AS (
SELECT
'0x' || SUBSTR(topics [1], 27) AS borrower_address,
ethereum.public.udf_hex_to_int(SUBSTRING(data, 3, 64)) :: NUMERIC / 1e18 AS adjust_principal,
ethereum.public.udf_hex_to_int(SUBSTRING(data, 131, 64)) :: NUMERIC / 1e18 AS adjust_collateral,
tx_hash
FROM
mezo.testnet.fact_event_logs
WHERE
topics [0] = '0xf575eb5cdee005607f56587351e18943ddacd11756b9d37980ec251797ff136c'
AND origin_function_signature = '0x8e54c119'
AND contract_address = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
),
combined AS (
SELECT
o.borrower_address,
COALESCE(SUM(o.open_principal), 0) AS total_open_principal,
COALESCE(SUM(o.open_collateral), 0) AS total_open_collateral,
COALESCE(SUM(a.adjust_principal), 0) AS total_adjust_principal,
COALESCE(SUM(a.adjust_collateral), 0) AS total_adjust_collateral,
COUNT(DISTINCT o.tx_hash) AS open_trove_transactions,
COUNT(DISTINCT a.tx_hash) AS adjust_trove_transactions
FROM
Last run: 4 days ago
9
498B
4s