0xHaM-d Actions After Withdrawal on Ehtereum
    Updated 2022-08-13
    with cefi as (
    select
    address,
    label
    from ethereum.core.dim_labels
    where label_type ='cex'
    and label_subtype = 'hot_wallet'
    )
    , tx as (
    select
    block_timestamp,
    contract_address,
    tx_hash,
    to_address as destination,
    amount_usd
    from ethereum.core.ez_token_transfers a join cefi b on a.from_address = b.address
    and amount_usd > 0
    and block_timestamp::date >= CURRENT_DATE - 180

    union all

    select
    block_timestamp,
    '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' as contract_address, -- wETH Contract_Address
    tx_hash,
    eth_to_address as destination,
    amount_usd
    from ethereum.core.ez_eth_transfers where eth_from_address in (select address from cefi)
    and amount_usd > 0
    and block_timestamp::date >= CURRENT_DATE - 180
    )
    ,swap_tx as (
    select
    a.block_timestamp,
    origin_from_address
    from ethereum.core.ez_dex_swaps a join tx b on a.origin_from_address = b.destination
    Run a query to Download Data