Salehcompare tobin tax vs spread fee
Updated 2022-03-27
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT CASE WHEN s.date is null then t.DATE
else s.date end as date,
t.amount as tubin_gas_fee,
s.fee_usd as spread_gas_fee
FROM
(SELECT date_trunc('month', block_timestamp)::date as date,
sum(fee[0]:amount)/1000000 as amount
FROM terra.transactions
WHERE fee[0]:denom = 'uusd'
GROUP by date) t
full join
(SELECT date_trunc('month', block_timestamp)::date as DATE,
sum(SWAP_FEE_AMOUNT_USD) as fee_usd
FROM terra.swaps
WHERE ((token_0_currency = 'LUNA' and token_1_currency = 'UST') OR (token_1_currency = 'LUNA' and token_0_currency = 'UST'))
and block_timestamp::date<='2021-09-30'
group by date) s
on s.date= t.date
Run a query to Download Data