CryptoIcicleFlash Bounty: SAFE Airdrop Farmers - ETH Stored
    Updated 2022-09-14
    -- Use your analytical prowess to earn a potential big payout + get some serious spotlight! SafeDAO is currently reworking its SAFE token airdrop in order to include a broader section of their community. However, the DAO wants to ensure those tokens go to the community — not airdrop farmers.

    -- Pay by Quality
    -- Your score determines your final payout.
    -- Grand Prize 112.5 USDC (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 75 USDC
    -- Score Multiplier 0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Intermediate
    -- Difficulty Hard

    -- SQL Credit: https://app.flipsidecrypto.com/velocity/queries/bf2f57f8-dc9f-4592-a0a3-577889013c1a
    with
    create_safe_cte as (
    select
    distinct
    from_address
    from ethereum.core.fact_traces
    where 1=1
    and tx_status = 'SUCCESS'
    and type = 'DELEGATECALL' -- The delegate call to the master copy is the Safe address
    and (
    substr(input,1,10) = '0x0ec78d9e' -- setup methods of v0.1.0
    and to_address = '0x8942595a2dc5181df0465af0d7be08c8f23c93af' -- mastercopy v0.1.0
    )
    or (
    substr(input,1,10) = '0xa97ab18a' -- setup methods of v1.0.0
    and to_address = '0xb6029ea3b2c51d09a50b53ca8012feeb05bda35a' -- setup methods of v1.0.0
    )
    or (
    substr(input,1,10) = '0xb63e800d' -- setup methods of v1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.0L2
    and to_address in ('0xae32496491b53841efb51829d6f886387708f99b','0x34cfac646f301356faa8b21e94227e3583fe3f5f','0x6851d6fdfafd08c0295c392436245e5bc78b0185','0xd9db270c1b5e3bd161e8c8503c55ceabee709552','0x3e5c63644e683549055b9be8653de26e0b4cd36e') -- mastercopy v1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.0L2
    )
    and BLOCK_TIMESTAMP::date between '2022-02-09' and '2022-08-18'
    )
    , eth_tx_cte as (
    Run a query to Download Data