Query editor
with all_rbw_staked as (select --Staking v1"from" as depositer,block_time,bytearray_to_uint256(substring(data from 5 for 32))/1e18 as rbw_staked,bytearray_to_uint256(substring(data from 37 for 32))/2592000 as months_staked,date_add('day', cast(bytearray_to_uint256(substring(data from 37 for 32))/(2592000) as bigint) * 30, block_time) as unlock_date --each month is 30daysfrom polygon.transactionswhere substring(data from 1 for 4) = 0x8dbdbe6dand to in(0xab08b85Be2066165Deae128D582d62E5377209B8, --staking v10x2eCe5f1677B76D031E2882d57eF46AA6d0Bf04AD, --staking v1.50x4942AfFDeCF26e3BbE43847F63660ab7bfA18136 --staking v2)--and not "from" = 0xaf404fff8240f72b7a5dc03a1439e9f5bd63b437and bytearray_to_uint256(substring(data from 37 for 32))/2592000 < cast(25 as uint256) --current limit is 12 months, elimiates anthing above 25 months (which should be impossible)and date_add('day', cast(bytearray_to_uint256(substring(data from 37 for 32))/(2592000) as bigint) * 30, block_time) > now() --checks for unlocks only from todday onwward, ignores pastand success)selectdate_trunc('month',unlock_date) as day,sum(rbw_staked) as rbw_unlockfrom all_rbw_stakedgroup by 1order by 1 desc