freeman_7VELODROME GOVERNACE
Updated 2024-09-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- Pools with the highest vote in each Epoch
-- pool with the highest votes get the biggest share of the emission of $velo token
With vote as (
SELECT
Date_trunc('week',block_timestamp) as week,
DECODED_LOG:voter as voters,
DECODED_LOG:pool as pool,
DECODED_LOG:weight as vote_weight
From optimism.core.ez_decoded_event_logs
Where origin_to_address = lower('0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C')
And origin_function_signature = lower('0x7ac09bf7')
And event_name ilike 'voted'
),
EpochVote as (
Select
Week as epoch,
Pool,
count(voters) as pool_voters,
Sum(vote_weight) as totalWeight
From vote
Group by epoch,pool
Order by epoch
)
SELECT
epoch,
pool,
symbol,
pool_voters,
total_epoch_voter,
(pool_voters*100)/total_epoch_voter as Percentage_Of_pool_voter_total_epoch_voter,
pool_vote_weight,
total_pools_weight,
(pool_vote_weight*100)/total_pools_weight as pecentage_of_pool_wieght_to_total_weight
QueryRunArchived: QueryRun has been archived