Query editor
-- (Re)delegation Week will occur between July 17, 2024 and July 23, 2024. https://forum.arbitrum.foundation/t/what-is-re-delegation-week-application-thread/25262-- do we see any meangingful uptick in delegation activity?-- do we see delegations coming from previously idle arb-- do we see REdelegations coming from previosuly delegatated arb (from one delegation to another)-- do we see UNdelegations where Arb delegated turns to idle arb-- metrics:-- i) how many delegate txs have happened on a day to day basis throughout the week-- eg fields: Delegator (token holder) | Delegate | Voting power delegated | Time stamp-- ii) track overall delegations by # of txs and amount of delegations-- and chart this on day to day trend and also compare pre/post redelegation week to see if any significant changes in volumes/* glossary key termsToken holders: Members of the Arbitrum community who hold the $ARB tokenDelegate: A party that can vote on Arbitrum Governance proposals 1. Could be an $ARB token holder or someone to whom other $ARB token holders have delegated their voting powerDelegator: A party who assigns their voting power to someone else, to vote on their behalfVoting Power: The sum of $ARB tokens held by a token holder*/with votingpower_change_delegations as (select *, cast(fromDelegate_newBalance/1e18 as double)-cast(fromDelegate_previousBalance/1e18 as double) as diff_fromdelegate, cast(toDelegate_newBalance/1e18 as double)-cast(toDelegate_previousBalance/1e18 as double) as diff_todelegatefrom (select vc.evt_tx_hash, c.name as ensname, dc.delegator, dc.fromDelegate, dc.toDelegate, vc.evt_block_time, max(case when fromDelegate=Delegate then vc.previousBalance end) as fromDelegate_previousBalance, max(case when fromDelegate=Delegate then vc.newBalance end )as fromDelegate_newBalance, max(case when toDelegate=Delegate then vc.previousBalance end )as toDelegate_previousBalance, max(case when toDelegate=Delegate then vc.newBalance end) as toDelegate_newBalance---,vc.previousbalance--, vc.newBalancefrom arbitrum_arbitrum.L2ArbitrumToken_evt_DelegateVotesChanged vcLEFT join arbitrum_arbitrum.L2ArbitrumToken_evt_DelegateChanged dcon vc.evt_tx_hash=dc.evt_tx_hashand ( vc.delegate=dc.todelegate or vc.delegate=dc.fromdelegate)LEFT JOIN ens.reverse_latest c ON vc.delegate = c.addresswhere date_trunc('day',vc.evt_block_time) >= timestamp '{{start_date}}'group by 1,2,3,4,5,6))/*select *,previousBalance/1e18, newBalance/1e18, cast(newBalance/1e18 as double)-cast(previousBalance/1e18 as double) as difffrom votingpower_change_delegationswhere evt_tx_hash in( 0x7ff2bd11e694bb8e7a2edc1e52f2563fe66a05d2100415cb7b9804dc16bb7882 --invoke compound bulker, 0xc760bc8979cd3615eb53e9bc00192d21b2be5d80e08879ba02f2323f5f7dbb60