PROTOCOL_REVENUE | |
---|---|
1 | 1074.37881 |
dylan_aprTotal_Protocol_Revenue
Updated 2025-02-27
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
›
⌄
with token_deposit_raw_dwd as
(
select
-- BLOCK_TIMESTAMP
-- ,TX_HASH
-- ,from_address
-- ,to_address
-- ,depoist_value
-- ,EVENT_INDEX
-- ,CONTRACT_ADDRESS
*
from
(
select
BLOCK_NUMBER
,BLOCK_TIMESTAMP
,TX_HASH
,EVENT_INDEX
,CONTRACT_ADDRESS
,TOPICS
,'0x' || RIGHT(TOPIC_1, 40) as from_address
-- ,'0x' || RIGHT(TOPIC_2, 40) as to_address
,TOPIC_0
,TOPIC_1
,TOPIC_2
,TOPIC_3
,DATA as block_data
,ORIGIN_FROM_ADDRESS
,ORIGIN_TO_ADDRESS
,ORIGIN_FUNCTION_SIGNATURE
,TX_SUCCEEDED
,TRY_TO_NUMBER(utils.udf_hex_to_int(SUBSTR(REPLACE(data, '0x', ''), 1, 64)))/1e18 as shares
,TRY_TO_NUMBER(utils.udf_hex_to_int(SUBSTR(REPLACE(data, '0x', ''), 65, 64)))/1e18 as assets
,TRY_TO_NUMBER(utils.udf_hex_to_int(SUBSTR(REPLACE(data, '0x', ''), 129, 64)))/1e18 as fee
-- ,TRY_TO_NUMBER(utils.udf_hex_to_int(SUBSTR(LEFT(DATA, 66),3)))/1e18 AS depoist_value
-- ,SUBSTR(LEFT(DATA, 66),3) as first_half
Last run: 4 days ago
1
14B
23s