kiacryptoLP providers and yield farmers
Updated 2022-08-27Copy Reference Fork
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
›
⌄
-- credit cryptoicicle
with lps as (
-- Add Liquidity
select
date_trunc('day',block_timestamp) as date,
tx_hash,
origin_from_address as user_wallet,
event_inputs:value / pow(10, 18) as amount,
contract_address
from ethereum.core.fact_event_logs
where origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
and event_name = 'Transfer'
and event_inputs:from::string = '0x0000000000000000000000000000000000000000'
and date >= '2022-01-01'
and origin_function_signature in (
'0xe8e33700' -- addLiquidity
,'0xf305d719' -- addLiquidityETH
)
),
open_lps as (
select
user_wallet,
count(*) as open_LP_position
from lps
group by 1
),
avg_open_lps as (
select avg(open_LP_position) as avg_open_LP_position
from open_lps
),
farms as (
-- Stake in MasterChef
select
date_trunc('day',block_timestamp) as date,
tx_id as tx_hash,
Run a query to Download Data