Query editor
-- Staking Activity-- Bc of redelegations, we can't simply look at the staking events bc there will likely exist double counting-- so, to circumvent this, we can look instead at the balance netflow from that set of team/investor addresses-- considering the netflow is negative, we can safely infer that it represents the staked amount given these tokens are locked and the-- only possible transfer path is towards the staking contract-- we can do this by querying our exisiting table with funded amount and balances dune view that contains the present value, then determine the deltaWITH funded AS (SELECT account AS address, eigen_balance AS funded_amountFROM query_4127599),eigen_delta_accounts AS (SELECT accountFROM query_4101161),latest_balance AS (SELECT cb.address, cb.balanceFROM tokens_ethereum.balances cbWHERE cb.token_address = 0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83AND cb.block_number = (SELECT MAX(block_number)FROM tokens_ethereum.balancesWHERE address = cb.addressAND token_address = 0xec53bF9167f50cDEB3Ae105f56099aaaB9061F83))SELECT lb.address,(-lb.balance + f.funded_amount) AS total_staked,lb.balance AS current_balance,f.funded_amount,SUM (-lb.balance + f.funded_amount) OVER (ORDER BY -lb.balance + f.funded_amount) as total_staked_by_investorsFROM latest_balance lbJOIN funded fON lb.address = f.addressJOIN eigen_delta_accounts edON lb.address = ed.accountORDER BY SUM (-lb.balance + f.funded_amount) OVER (ORDER BY -lb.balance + f.funded_amount DESC)