binhachonTerra LFG - Curve pool ratio
Updated 2022-03-11
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
›
⌄
with pool_3crv_balance as (
select
balance_date,
amount_usd as "3Crv amount"
from ethereum.erc20_balances
where balance_date > getdate() - interval'90 days'
and user_address = '0xceaf7747579696a2f0bb206a14210e3c9e6fb269'
and symbol = '3Crv'
),
pool_UST_balance as (
select
balance_date,
non_adjusted_balance / 1e6 * price as "UST amount"
from ethereum.erc20_balances
where balance_date > getdate() - interval'90 days'
and user_address = '0xceaf7747579696a2f0bb206a14210e3c9e6fb269'
and contract_address = '0xa693b19d2931d498c5b318df961919bb4aee87a5'
)
select
pool_UST_balance.balance_date,
"UST amount",
"3Crv amount",
"UST amount"/"3Crv amount" as "UST/3Crv ratio",
1 as "Ideal ratio",
"UST amount" + "3Crv amount" as "Liquidity ($)"
from pool_3crv_balance
inner join pool_UST_balance on (pool_UST_balance.balance_date = pool_3crv_balance.balance_date)
Run a query to Download Data