adriaparcerisasSybils evolution 2
    Updated 2024-08-15
    WITH
    -- EtherFi Sybil Detection
    weeth AS (
    SELECT
    MIN(TRUNC(block_timestamp, 'day')) AS deposit_time,
    to_address AS address,
    SUM(amount_usd) AS amount_deposited
    FROM
    ethereum.core.ez_token_transfers
    WHERE
    (contract_address = LOWER('0x35fA164735182de50811E8e2E824cFb9B6118ac2') OR
    contract_address = LOWER('0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee'))
    AND block_timestamp < '2024-03-18'
    AND amount_usd IS NOT NULL
    GROUP BY
    2
    ),
    weeth2 AS (
    SELECT
    MAX(TRUNC(block_timestamp, 'day')) AS withdrawal_time,
    from_address AS address,
    SUM(amount_usd) AS amount_withdrawn
    FROM
    ethereum.core.ez_token_transfers
    WHERE
    (contract_address = LOWER('0x35fA164735182de50811E8e2E824cFb9B6118ac2') OR
    contract_address = LOWER('0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee'))
    AND amount_usd IS NOT NULL
    GROUP BY
    2
    ),
    ins AS (
    SELECT
    DISTINCT nft_to_address,
    COUNT(DISTINCT tokenid) AS nfts_in
    FROM
    QueryRunArchived: QueryRun has been archived