maybeyonastorn_erc_weekly_outflow
    Updated 2022-08-10
    with
    prices as (
    select
    hour,
    symbol,
    price
    from ethereum.core.fact_hourly_token_prices
    where
    symbol in ('WBTC','USDC','USDT','DAI')
    ),
    tornado_eth as (
    select
    address,
    address_name
    from crosschain.address_labels
    where project_name = 'tornado cash'
    and blockchain = 'ethereum' --arbitrum, avalanche, polygon
    and label_subtype = 'general_contract'
    and (
    address_name like '%usdt%' or-- usdt,wbtc,dai,usdc,cdai,cusdc [eth,avax,matic]
    address_name like '%usdc%' or
    address_name like '%dai%' or
    address_name like '%wbtc%'
    )
    ),
    tornado_out as (
    select
    block_timestamp,
    tx_hash,
    'out' as direction,
    t.from_address as tornado_contract,
    e.address_name as contract_name,
    symbol,
    t.to_address as user,
    amount
    from ethereum.core.ez_token_transfers t join tornado_eth e on t.from_address = e.address
    Run a query to Download Data