Updated 2025-03-10




    WITH staking_events AS (
    SELECT
    block_timestamp,
    tx_hash,
    CONTRACT_NAME,
    event_name,
    ORIGIN_FUNCTION_SIGNATURE,
    -- ,DECODED_LOG
    -- ,event_name
    DECODED_LOG:from as wallet ,
    DECODED_LOG:to as reciver,
    DECODED_LOG:value/1e6 as amount,
    -- tx_hash,
    -- contract_address,
    -- event_name,
    -- DECODED_LOG,
    -- DECODED_LOG:"assets" as staked_amount, -- Assuming 18 decimals
    origin_from_address as staker_address
    FROM avalanche.core.ez_decoded_event_logs
    where block_timestamp::date>='2024-11-15'
    -- and TX_SUCCEEDED
    -- and TOPIC_0='0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    -- and EVENT_REMOVED=false
    and contract_address='0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
    -- and origin_to_address ='0x1499cb3197427b78dc0e2d356a1e0e4149e0ed51'
    and ORIGIN_FUNCTION_SIGNATURE= '0xd48c03e5'
    and CONTRACT_NAME ilike 'USD%'
    )

    SELECT
    -- DATE_TRUNC('day', block_timestamp) as date,
    -- event_name,tx_hash,DECODED_LOG
    Last run: about 1 month ago
    NUMBER_OF_STAKES
    TOTAL_STAKED_AMOUNT
    UNIQUE_STAKERS
    UNIQUE_RECIVERS
    1
    50813483963.2827822511
    1
    29B
    3s