WEEK_ | SIZE_ | SIZE_ORDER | BORROW_USD_VOLUME | AVG_BORROW_USD_AMOUNT | N_BORROWERS | |
---|---|---|---|---|---|---|
1 | 2024-01-01 00:00:00.000 | $0 - $999 | aa | 19478.392243398 | 190.964629837 | 30 |
2 | 2024-01-01 00:00:00.000 | $1k - $9.9k | bb | 104720.316343811 | 3173.342919509 | 13 |
3 | 2024-01-01 00:00:00.000 | $10k - $99k | cc | 146212.694558577 | 29242.538911715 | 4 |
4 | 2024-01-01 00:00:00.000 | $100k - $999k | dd | 596718.477753616 | 198906.159251205 | 1 |
5 | 2024-01-08 00:00:00.000 | $0 - $999 | aa | 13413.943565411 | 149.043817393 | 34 |
6 | 2024-01-08 00:00:00.000 | $1k - $9.9k | bb | 78758.401760192 | 2812.800062864 | 14 |
7 | 2024-01-08 00:00:00.000 | $10k - $99k | cc | 238754.730279463 | 47750.946055893 | 4 |
8 | 2024-01-08 00:00:00.000 | $100k - $999k | dd | 724011.43567621 | 144802.287135242 | 3 |
9 | 2024-01-15 00:00:00.000 | $0 - $999 | aa | 11174.649481975 | 171.917684338 | 27 |
10 | 2024-01-15 00:00:00.000 | $1k - $9.9k | bb | 88466.26071648 | 4212.679081737 | 9 |
11 | 2024-01-15 00:00:00.000 | $10k - $99k | cc | 684209.32886392 | 45613.955257595 | 4 |
12 | 2024-01-15 00:00:00.000 | $100k - $999k | dd | 672398.742439159 | 168099.68560979 | 3 |
13 | 2024-01-22 00:00:00.000 | $0 - $999 | aa | 32304.718935837 | 199.411845283 | 36 |
14 | 2024-01-22 00:00:00.000 | $1k - $9.9k | bb | 34697.710112711 | 3154.337282974 | 5 |
15 | 2024-01-22 00:00:00.000 | $10k - $99k | cc | 177542.599605987 | 29590.433267664 | 5 |
16 | 2024-01-22 00:00:00.000 | $100k - $999k | dd | 100152.064689453 | 100152.064689453 | 1 |
17 | 2024-01-29 00:00:00.000 | $0 - $999 | aa | 9643.834520734 | 301.369828773 | 17 |
18 | 2024-01-29 00:00:00.000 | $1k - $9.9k | bb | 20410.459623304 | 2267.828847034 | 5 |
19 | 2024-01-29 00:00:00.000 | $10k - $99k | cc | 33994.040111785 | 33994.040111785 | 1 |
20 | 2024-02-05 00:00:00.000 | $0 - $999 | aa | 13365.947688033 | 247.517549778 | 26 |
charliemarketplaceKPI-stablecoin_borrow_volume
Updated 3 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 stablecoins AS (
SELECT tokens
FROM (VALUES
('a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near'),
('853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near'), -- frax
('17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1'),
('dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near'),
('usdt.tether-token.near')
) AS s(tokens)
)
select
date_trunc('week', block_timestamp) as week_,
case
when amount_usd >= 1000000 then '$1M+'
when amount_usd >= 100000 then '$100k - $999k'
when amount_usd >= 10000 then '$10k - $99k'
when amount_usd >= 1000 then '$1k - $9.9k'
else '$0 - $999' end as size_,
case
when amount_usd >= 1000000 then 'ee'
when amount_usd >= 100000 then 'dd'
when amount_usd >= 10000 then 'cc'
when amount_usd >= 1000 then 'bb'
else 'aa' end as size_order,
sum(amount_usd) as borrow_usd_volume,
avg(amount_usd) as avg_borrow_usd_amount,
count(distinct sender_id) as n_borrowers
from near.defi.ez_lending
where block_timestamp >= '2024-01-01'
and actions = 'borrow'
and amount_usd IS NOT NULL
and token_address IN (select tokens from stablecoins)
group by week_, size_, size_order
order by week_ asc, size_order asc
Last run: 3 days ago
...
250
20KB
22s