yasminAXON-STABLE Pool WEEKLY
    Updated 2025-04-29
    WITH
    USDC_deposits AS (
    SELECT
    DATE_TRUNC('week', BLOCK_TIMESTAMP) AS week,
    COUNT(DISTINCT ORIGIN_FROM_ADDRESS) AS "unique depositors",
    SUM(DECODED_LOG:amount/POW(10,6)) AS "total deposited"
    FROM avalanche.core.ez_decoded_event_logs
    WHERE DECODED_LOG:token='0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
    --AND DECODED_LOG:dst='0x29eeb257a2a6ecde2984acedf80a1b687f18ec91'
    AND EVENT_NAME ='Deposit'
    AND CONTRACT_ADDRESS='0x74163b79733aea2d9c4ced777dc49d591db739e9'
    GROUP BY 1
    ),
    UXDA_deposits AS (
    SELECT
    DATE_TRUNC('week', BLOCK_TIMESTAMP) AS week,
    COUNT(DISTINCT ORIGIN_FROM_ADDRESS) AS "unique depositors",
    SUM(DECODED_LOG:amount/POW(10,18)) AS "total deposited"
    FROM avalanche.core.ez_decoded_event_logs
    WHERE DECODED_LOG:token='0xc8e9053d354976ccd78f58fdbc7df2b0a9a127e6'
    --AND DECODED_LOG:dst='0x29eeb257a2a6ecde2984acedf80a1b687f18ec91'
    AND EVENT_NAME ='Deposit'
    AND CONTRACT_ADDRESS='0x74163b79733aea2d9c4ced777dc49d591db739e9'
    GROUP BY 1
    )
    SELECT
    COALESCE(g.week, w.week) AS week,
    g."unique depositors" AS "USDC depositors",
    g."total deposited" AS "USDC deposited",
    w."unique depositors" AS "UXDA depositors",
    w."total deposited" AS "UXDA deposited"
    FROM USDC_deposits g
    FULL OUTER JOIN UXDA_deposits w ON g.week = w.week
    ORDER BY week


    QueryRunArchived: QueryRun has been archived