shreyash-5873Slashing Counts for Current Validators in March
Updated 2021-12-11
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
›
⌄
-- https://docs.terra.money/dev/spec-slashing.html#downtimejailduration
with slash_events as (select
block_id,
block_timestamp,
index,
event_attributes:address as validator_address,
label,
event_attributes:reason as slashing_reason,
event_attributes:power as voting_power,
case when event_attributes:reason::string = 'double_sign' then event_attributes:power * 0.05
when event_attributes:reason::string = 'missing_signature' then event_attributes:power * 0.0001
else event_attributes:power * 0.0001
end as amount_slashed
from terra.transitions t
inner join terra.validator_labels l
on event_attributes:address = l.vp_address
where event = 'slash'
and block_timestamp >= current_date() - 365
and amount_slashed > 0
order by amount_slashed desc)
select
date(block_timestamp) as block_date,
label,
count(amount_slashed) as total_slashes_for_current_validators
from slash_events
where month(block_timestamp) = 3
group by 1, 2
order by 1, 3 desc;
Run a query to Download Data