pandaSanctum: Router Program Explorer
    Updated 2023-08-27
    /* The operations in this query encompass transactions conducted through Sanctum's router program.
    The table includes 'Instant Staking' and 'LST Swapping' transactions. */

    WITH sanctum AS
    (
    SELECT
    distinct tx_id,
    signers[0] as user_address
    FROM
    solana.core.fact_events
    WHERE
    program_id = 'stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq'
    ),

    transfers AS
    (
    SELECT
    block_timestamp,
    b.user_address,
    index,
    a.tx_id,
    mint,
    amount
    FROM
    solana.core.fact_transfers a inner join sanctum b on (a.tx_id = b.tx_id)
    ),

    indexTab AS
    (
    SELECT
    tx_id,
    MIN(index) as min_index,
    MAX(index) as max_index
    from
    transfers GROUP BY 1
    Run a query to Download Data