Moeaave borrow
Updated 2023-03-01
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
›
⌄
select
date_trunc({{scale}},BLOCK_TIMESTAMP)::date as date ,
'Borrow' as action ,
-- AAVE_VERSION, SYMBOL,
count (distinct TX_HASH) as txns ,
sum(BORROWED_USD) as amount_USD
from
ethereum.aave.ez_borrows
where
BORROWER_ADDRESS = '{{user_address}}'
group by 1,2
union all
select
date_trunc({{scale}},BLOCK_TIMESTAMP)::date as date ,
'Repay' as action ,
-- AAVE_VERSION, SYMBOL,
count (distinct TX_HASH) as txns ,
sum(REPAYED_USD) as amount_USD
from
ethereum.aave.ez_repayments
where
PAYER = '{{user_address}}'
group by 1,2
Run a query to Download Data