CryptoIcicleTop 2 Stablecoins By Volume
Updated 2021-09-01Copy Reference Fork
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
›
⌄
-- What has the interest rate for the current top 2 stablecoins by volume on Aave been over the past 6 months?
-- Top 2 stable coins by volume
-- 31114 USDC 0xbcca60bb61934080951369a648fb03df4f96263c
-- 20519 USDT 0x3ed3b47dd13ec9a98b44e6204a523e766b225811
WITH TOP_2_STABLE_COINS AS (
(SELECT 'USDC' AS "SYMBOL", '0xbcca60bb61934080951369a648fb03df4f96263c' AS "ADDRESS")
UNION
(SELECT 'USDT' AS "SYMBOL", '0x3ed3b47dd13ec9a98b44e6204a523e766b225811' AS "ADDRESS")
)
SELECT
date_trunc('day',block_hour) AS "DATE",
c."SYMBOL",
AVG(borrow_rate_stable),
AVG(borrow_rate_variable),
AVG(supply_rate)
FROM aave.market_stats m
JOIN TOP_2_STABLE_COINS c
ON c."ADDRESS" = m.atoken_address
WHERE "DATE" >= (CURRENT_DATE - 180)
GROUP BY 1,2
ORDER BY 1 ASC
Run a query to Download Data