ZookTGC Staking Leaderboard
    Updated 3 hours ago
    -- deposit transactions include :
    --'Deposit' (to staking contract)
    --'Claim and Stake'
    --'Buy TGC with ETH and Stake'
    --'Buy TGC with USDT and Stake'

    --accrued TGC rewards are not included in the Net_TGC_staked result. Similarly, 'claim rewards' are not included in Withdrawals.

    WITH deposit_data AS (
    SELECT -- deposits
    DECODED_LOG:user::STRING AS FROM_ADDRESS, -- Accessing 'user' field from the DECODED_LOG JSON object
    SUM(DECODED_LOG:amount::NUMBER) / 1E18 AS total_deposits_staking -- Accessing 'amount' field
    FROM ethereum.core.ez_decoded_event_logs -- UPDATED TABLE NAME
    WHERE
    BLOCK_TIMESTAMP > '2023-01-01 09:00:47.000'
    AND
    (lower(CONTRACT_ADDRESS) = lower('0x0916568854Fc53B720186052d8013D62A0409b47')
    OR lower(CONTRACT_ADDRESS) = lower('0x258c3104388f8cd72c8b4336fc536033e6db764e')
    OR lower(CONTRACT_ADDRESS) = lower('0x21d6D6d6FFD8b68e94bf5159Bb029635Af540aE8')
    )
    AND EVENT_NAME = 'Deposit'
    GROUP BY FROM_ADDRESS
    ),

    withdrawal_data AS (
    SELECT
    DECODED_LOG:user::STRING AS TO_ADDRESS, -- Accessing 'user' field from the DECODED_LOG JSON object
    SUM(DECODED_LOG:amount::NUMBER) / 1E18 AS total_withdrawals_unstaking -- Accessing 'amount' field
    FROM ethereum.core.ez_decoded_event_logs -- UPDATED TABLE NAME
    WHERE
    BLOCK_TIMESTAMP > '2023-01-01 09:00:47.000'
    AND
    (lower(CONTRACT_ADDRESS) = lower('0x0916568854Fc53B720186052d8013D62A0409b47')
    OR lower(CONTRACT_ADDRESS) = lower('0x258c3104388f8cd72c8b4336fc536033e6db764e')
    OR lower(CONTRACT_ADDRESS) = lower('0x21d6D6d6FFD8b68e94bf5159Bb029635Af540aE8')
    )
    Last run: about 3 hours agoAuto-refreshes every 24 hours
    STAKER_ADDRESS
    TGC_STAKED
    1
    0x722aca88a2476f70c96f78c55f4bdeb618c9525b7844960
    2
    0x1208ce9f6c8346af03d9622be6a5b4478830abb63302601
    3
    0x7973b7f810239df1e8b1d01d088f50c82c297e1f1926000
    4
    0xe78f351e4ec96c0ddc052e50fdcbbe486fac8c961800000
    5
    0x94349c7126c164f976cbdee656dfa7c7e691acae1457118
    6
    0x24153947c70fba132f627984672dc3486ffc2ff21396304
    7
    0x717affd69e3482fcf2cf60fd69782eb101f81faf1300000
    8
    0xd54283c2318fcea40662f146b8a1508e98e1b0081238257
    9
    0x43b0a1aac5eebfd11d8c47d4da8db0c545cbb2521126244
    10
    0x68d39920a2e1468fb0240c1faed8d3c9a36bd3f01111111
    11
    0xc4e17df17080e7e571be0d0dc2fe2f7f38a347c51055932
    12
    0xdf5251077296f7d507a3649c7f22b2975afca9a11001370
    13
    0x9e2fee79643f4a191e02fa629bca6c6b680ae31b1000004
    14
    0x4885e698820201b5c10b9e9d14398253b4eece421000000
    15
    0x27a54db9d46675eab25764ac073a44540dc375851000000
    16
    0x27f11162c185efd45ca90a8f906860a5b9316adb850000
    17
    0x1d952e5e052776c56cad91e5c3c882c09f1eb52c829486
    18
    0x68ac5f59c5df8cf58b75cab294fdd776b09ec7b9800000
    19
    0x83a15897eede571447dd0c74e84f4b1e39e7b922771900
    20
    0x4c05908d02467840c3bdb9c1848f3c13090eabdf721822
    ...
    4391
    214KB
    291s