theericstoneUNI Sent To Exchanges
    Updated 2021-02-02
    --we’d like to understand is the coin movement of
    --UNI liquidity mining rewards
    --We’d specifically like to leverage
    --Velocity’s exchange attribution data
    --to understand the amount of UNI rewards going to exchanges

    --identify UNI liquidity providers

    --https://etherscan.io/tx/0x94d31b34bc7eb9a4b429ce099efb3fc11d3493eb4d8934c3d335f8cddf130de0


    with uni_transfers as(
    select *
    from gold.ethereum_events
    where block_timestamp > '2020-09-18' --launch date of Uniswap farming
    AND contract_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' --UNI token
    and event_type='erc20_transfer'
    ),


    farming_rewards as (
    select *
    from uni_transfers
    where from_address in (
    '0x6c3e4cb2e96b01f4b866965a91ed4437839a121a', --USDT
    '0x7fba4b8dc5e7616e59622806932dbea72537a56b', --USDC
    '0xa1484c3aa22a66c62b77e0ae78e15258bd0cb711', -- DAI
    '0xca35e32e7926b96a9988f61d510e038108d8068e') --WBTC
    ),

    reward_recipients as (
    select to_address as address, sum(amount) as incoming_uni
    from farming_rewards
    where amount < 1000000000000000
    group by 1
    ),
    Run a query to Download Data