SniperDaily total volume in collateral and lending
Updated 2022-07-14
99
1
2
3
4
5
6
7
8
9
10
11
›
⌄
select 'Lending' as type ,date(block_timestamp) as date_ , count(DISTINCT(DEPOSITOR)) as user,count(DISTINCT(tx_hash)) as total_tx , sum(amount_usd) as volume
from polygon.sushi.ez_lending
where action = 'Deposit' and amount_usd is not null and symbol in ('USDC','BUSD', 'USDT','DAI') and block_timestamp::date >= '2022-01-01'
group by 1,2
UNION
select 'Collateral' as type , date(block_timestamp) as date_ , count(DISTINCT(BORROWER)) as user,count(DISTINCT(tx_hash)) as total_tx , sum(amount_usd) as volume
from polygon.sushi.ez_borrowing
where action = 'Borrow' and amount_usd is not null and COLLATERAL_SYMBOL in ('USDC','BUSD', 'USDT','DAI') and block_timestamp::date >= '2022-01-01'
group by 1,2
Run a query to Download Data