lidoPending Users Withdrawals
    Updated 21 hours ago
    -- calculates the amount of withdrawals requested
    with withdrawals_requested AS (
    SELECT
    SUM(DECODED_LOG:amountOfStETH) / 1e18 AS amount
    FROM ethereum.core.ez_decoded_event_logs
    WHERE CONTRACT_ADDRESS = '0x889edc2edab5f40e902b864ad4d7ade8e412f9b1'
    AND EVENT_NAME = 'WithdrawalRequested'
    )
    -- calculates the amount of finalized withdrawals
    , withdrawals_finalized AS (
    SELECT
    SUM(DECODED_LOG:amountOfETHLocked) / 1e18 AS amount
    FROM ethereum.core.ez_decoded_event_logs
    WHERE CONTRACT_ADDRESS = '0x889edc2edab5f40e902b864ad4d7ade8e412f9b1' --Lido withrawal queue
    AND EVENT_NAME = 'WithdrawalsFinalized'
    )
    -- calculates the amount of pending withdrawals
    , total_pending_withdrawals AS (
    SELECT
    SUM(amount) AS amount
    FROM
    (SELECT amount FROM withdrawals_requested
    UNION all
    SELECT -1 * amount FROM withdrawals_finalized)
    )
    -- calculates the total amount of withdrawals requested after the last Oracle update (within the last 13 minutes)
    , withdrawals_requested_after_last_oracle AS (
    SELECT
    SUM(DECODED_LOG:amountOfStETH) / 1e18 AS amount
    FROM ethereum.core.ez_decoded_event_logs
    WHERE CONTRACT_ADDRESS = '0x889edc2edab5f40e902b864ad4d7ade8e412f9b1'
    AND EVENT_NAME = 'WithdrawalRequested'
    AND BLOCK_TIMESTAMP >= (
    SELECT
    MAX(BLOCK_TIMESTAMP) - interval '13 minute'
    FROM ethereum.core.ez_decoded_event_logs
    Last run: about 21 hours agoAuto-refreshes every 24 hours
    TXT
    TOTAL_PENDING
    WITHDRAWALS_AFTER_LAST_ORACLE
    1
    114,295 ETH / 1,819 ETH114294.9011278841819.173390814
    1
    73B
    216s