All Time Affiliate Earning $ | 30 Days Affiliate Earning $ | 7 Days Affiliate Earning $ | 24 Hours Affiliate Earning $ | YTD Affiliate Earning $ | |
---|---|---|---|---|---|
1 | 32973478.23 | 1389902.69 | 354272.47 | 23015 | 22696396.84 |
BlockTrackertotal
Updated 2 days ago
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 pools_count as (
select
tx_id,
count(DISTINCT pool_name) as n_pools
from thorchain.defi.fact_swaps
where tx_id not in (select tx_id from thorchain.defi.fact_refund_events)
group by 1
)
,
all_time_affiliate_fee as (
select
zeroifnull(sum((from_amount_usd / n_pools) * AFFILIATE_FEE_BASIS_POINTS) / 10000) as all_time_affiliate_fee
from thorchain.defi.fact_swaps
join pools_count using(tx_id)
where AFFILIATE_ADDRESS is not null
),
one_month_affiliate_fee as (
select
zeroifnull(sum((from_amount_usd / n_pools) * AFFILIATE_FEE_BASIS_POINTS) / 10000) as one_month_affiliate_fee
from thorchain.defi.fact_swaps
join pools_count using(tx_id)
where block_timestamp::date > current_date - interval '1 month'
and AFFILIATE_ADDRESS is not null
)
,
one_week_affiliate_fee as (
select
zeroifnull(sum((from_amount_usd / n_pools) * AFFILIATE_FEE_BASIS_POINTS) / 10000) as one_week_affiliate_fee
from thorchain.defi.fact_swaps
join pools_count using(tx_id)
where block_timestamp::date > current_date - interval '1 week'
and AFFILIATE_ADDRESS is not null
)
,
one_day_affiliate_fee as (
select
Last run: 1 day ago
1
54B
23s