Moe9* maker
Updated 2023-03-12
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
weth_dep as (select
BLOCK_TIMESTAMP,
case when tx_hash in (select tx_hash from ethereum.maker.ez_vault_creation) then 'Vault creation'
else 'Re-deposit' end as type,
TOKEN_DEPOSITED,
TX_HASH,
DEPOSITOR,
AMOUNT_DEPOSITED
from
ethereum.maker.ez_deposits
where TOKEN_DEPOSITED = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
),
borrow as (
select
BLOCK_TIMESTAMP,
TX_HASH,
ORIGIN_TO_ADDRESS,symbol,contract_address,
AMOUNT
from ethereum.core.ez_token_transfers
where tx_hash in (select tx_hash from weth_dep)
and symbol in (
'USDC','USDT','DAI','FEI','BUSD','TUSD'
))
,fin as (
select
w.BLOCK_TIMESTAMP,
w.tx_hash,type,
symbol,contract_address,
ORIGIN_TO_ADDRESS,
AMOUNT as tot_borrowed,
AMOUNT_DEPOSITED as weth_deposited
from borrow d join weth_dep w on d.tx_hash = w.tx_hash
),
Run a query to Download Data