adriaparcerisasKittyPunch farm staking all by pools TABLE
    Updated 7 days ago
    WITH
    flow_price as (
    select avg(price) as flow_price from flow.price.ez_prices_hourly
    where symbol in ('FLOW') and hour >=current_date-1
    ),
    prices as (
    select symbol, avg(price) as price from flow.price.ez_prices_hourly
    where symbol in ('FLOW','USDF','ANKRFLOW','STGWETH') and hour >=current_date-1
    group by 1
    ),
    tokens_wflow_usdf as (
    select
    sum(case when from_address = '0x17e96496212d06eb1ff10c6f853669cc9947a1e7' then amount* -1 else amount end) total,
    case when contract_address='0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e' then 'FLOW' else 'USDF' end as token
    from
    (
    select
    *,
    concat('0x', substr(topic_1, 27, 40)) as from_address,
    concat('0x', substr(topic_2, 27, 40)) as to_address,
    case when contract_address='0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e' then try_to_number(utils.udf_hex_to_int(data :: string))/pow(10,18) else try_to_number(utils.udf_hex_to_int(data :: string))/pow(10,6) end as amount
    from
    flow.core_evm.fact_event_logs
    where
    contract_address in (
    lower('0xd3bf53dac106a0290b0483ecbc89d40fcc961f3e'), -- address for wflow
    lower('0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed') -- address for flow usd
    )
    and topic_0 = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' -- topic_0 for transfer event
    and (
    from_address = '0x17e96496212d06eb1ff10c6f853669cc9947a1e7' -- pool_address
    or to_address = '0x17e96496212d06eb1ff10c6f853669cc9947a1e7' -- pool_address
    )
    )
    group by token
    ),
    Last run: 7 days ago
    POOL_NAME
    Current LP Providers
    Total Farming Actions
    Total Amount Deposited
    Total Amount Withdrawn
    Current Amount Deposited
    1
    USDF-stgUSDC23960642156435.8735194585.886961849.99
    2
    FLOW-ankrFLOW28837910593.834583424.053327169.78
    3
    WFLOW-USDF12769013728062.6211256924.562471138.06
    4
    WETH-WFLOW1946521618053.21207860.841410192.37
    4
    231B
    13s