MeirFrax Convex Staking
Updated 2023-11-21
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
›
⌄
-- 0xE7211E87D60177575846936F2123b5FA6f0ce8Ab staking contract for frax
with dates as (
select
date_day
from ethereum.core.dim_dates
where date_day between '{{start_date}}' and current_date()
),
deposits as (
SELECT
block_timestamp,
(TO_NUMBER(DECODED_LOG:amount::string) / POW(10,18)) as staked_amount,
DECODED_LOG:source_address::string as user,
tx_hash
FROM ethereum.core.ez_decoded_event_logs
WHERE CONTRACT_ADDRESS = lower('{{frax_staking_contraxt}}')
AND EVENT_NAME = 'StakeLocked'
),
withdraws as (
SELECT
block_timestamp,
(TO_NUMBER(DECODED_LOG:liquidity::string) / POW(10,18)) as withdrawn_amount,
DECODED_LOG:destination_address::string as user,
tx_hash
FROM ethereum.core.ez_decoded_event_logs
WHERE CONTRACT_ADDRESS = lower('{{frax_staking_contraxt}}')
AND EVENT_NAME = 'WithdrawLocked'
),
frax_actions as (
SELECT
block_timestamp,
Run a query to Download Data