diff --git a/transformers/synthetix/models/marts/arbitrum/mainnet/core/fct_token_yields_arbitrum_mainnet.sql b/transformers/synthetix/models/marts/arbitrum/mainnet/core/fct_token_yields_arbitrum_mainnet.sql index 7611311c..408da78d 100644 --- a/transformers/synthetix/models/marts/arbitrum/mainnet/core/fct_token_yields_arbitrum_mainnet.sql +++ b/transformers/synthetix/models/marts/arbitrum/mainnet/core/fct_token_yields_arbitrum_mainnet.sql @@ -44,7 +44,7 @@ rate_changes as ( pool_id, collateral_type, exchange_rate, - exchange_rate / LAG(exchange_rate) over ( + exchange_rate / lag(exchange_rate) over ( partition by token_symbol, yield_token_symbol order by ts @@ -59,21 +59,21 @@ select collateral_type, exchange_rate, hourly_exchange_rate_pnl, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '24 HOURS' preceding and current row ) * 24 * 365 as apr_24h_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '7 DAYS' preceding and current row ) * 24 * 365 as apr_7d_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts diff --git a/transformers/synthetix/models/marts/base/mainnet/core/fct_token_yields_base_mainnet.sql b/transformers/synthetix/models/marts/base/mainnet/core/fct_token_yields_base_mainnet.sql index f364ca35..e869b3da 100644 --- a/transformers/synthetix/models/marts/base/mainnet/core/fct_token_yields_base_mainnet.sql +++ b/transformers/synthetix/models/marts/base/mainnet/core/fct_token_yields_base_mainnet.sql @@ -44,7 +44,7 @@ rate_changes as ( pool_id, collateral_type, exchange_rate, - exchange_rate / LAG(exchange_rate) over ( + exchange_rate / lag(exchange_rate) over ( partition by token_symbol, yield_token_symbol order by ts @@ -59,21 +59,21 @@ select collateral_type, exchange_rate, hourly_exchange_rate_pnl, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '24 HOURS' preceding and current row ) * 24 * 365 as apr_24h_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '7 DAYS' preceding and current row ) * 24 * 365 as apr_7d_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts diff --git a/transformers/synthetix/models/marts/eth/mainnet/core/fct_token_yields_eth_mainnet.sql b/transformers/synthetix/models/marts/eth/mainnet/core/fct_token_yields_eth_mainnet.sql index 32b55745..1360dbe2 100644 --- a/transformers/synthetix/models/marts/eth/mainnet/core/fct_token_yields_eth_mainnet.sql +++ b/transformers/synthetix/models/marts/eth/mainnet/core/fct_token_yields_eth_mainnet.sql @@ -44,7 +44,7 @@ rate_changes as ( pool_id, collateral_type, exchange_rate, - exchange_rate / LAG(exchange_rate) over ( + exchange_rate / lag(exchange_rate) over ( partition by token_symbol, yield_token_symbol order by ts @@ -59,21 +59,21 @@ select collateral_type, exchange_rate, hourly_exchange_rate_pnl, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '24 HOURS' preceding and current row ) * 24 * 365 as apr_24h_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts range between interval '7 DAYS' preceding and current row ) * 24 * 365 as apr_7d_underlying, - AVG(hourly_exchange_rate_pnl) over ( + avg(hourly_exchange_rate_pnl) over ( partition by collateral_type order by ts diff --git a/transformers/synthetix/seeds/tokens/eth_mainnet_tokens.csv b/transformers/synthetix/seeds/tokens/eth_mainnet_tokens.csv index 7e824041..bc2ec274 100644 --- a/transformers/synthetix/seeds/tokens/eth_mainnet_tokens.csv +++ b/transformers/synthetix/seeds/tokens/eth_mainnet_tokens.csv @@ -1,2 +1,3 @@ token_address,token_symbol,yield_token_symbol -0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F,SNX \ No newline at end of file +0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F,SNX +0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0,wstETH,ETH \ No newline at end of file