From 7ae8c9329d1df081335b6a7199377594451e899b Mon Sep 17 00:00:00 2001 From: ppclunghe Date: Wed, 2 Oct 2024 23:19:05 +0200 Subject: [PATCH 1/3] lido upstream liquidity updates --- .../models/_project/lido/lido_liquidity.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/lido_liquidity.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/lido_liquidity.sql index eadd5c77c34..4c1884e36f8 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/lido_liquidity.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/lido_liquidity.sql @@ -52,7 +52,17 @@ ref('lido_liquidity_zksync_maverick_pools'), ref('lido_liquidity_linea_syncswap_pools'), ref('lido_liquidity_scroll_syncswap_pools'), - ref('lido_liquidity_scroll_zebra_pools') + ref('lido_liquidity_scroll_zebra_pools'), + ref('lido_liquidity_arbitrum_pancakeswap_v3_pools'), + ref('lido_liquidity_base_maverick_pools'), + ref('lido_liquidity_base_pancakeswap_v3_pools'), + ref('lido_liquidity_bnb_pancakeswap_v3_pools'), + ref('lido_liquidity_bnb_thena_pools'), + ref('lido_liquidity_ethereum_curve_wsteth_pufeth_pool'), + ref('lido_liquidity_linea_lynex_pools'), + ref('lido_liquidity_scroll_maverick_pools'), + ref('lido_liquidity_scroll_nuri_pools'), + ref('lido_liquidity_zksync_pancakeswap_v3_pools') ] %} {% set project_start_date = '2020-12-15'%} From 40c2e59e565b3a2d81a416c4296e1446be7cf48f Mon Sep 17 00:00:00 2001 From: ppclunghe Date: Thu, 3 Oct 2024 09:07:34 +0200 Subject: [PATCH 2/3] fix fees --- .../lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql | 2 +- .../lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql | 1 + .../lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql index a861d12f4df..829273e4cc7 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql @@ -216,7 +216,7 @@ group by 1,2 ) , all_metrics as ( -select l.pool, pools.blockchain, pools.project, cast(l.time as date) as time, +select l.pool, pools.blockchain, pools.project, null as fee, cast(l.time as date) as time, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then tokenA else tokenB end main_token, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then p0.symbol else p1.symbol end main_token_symbol, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then tokenB else tokenA end paired_token, diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql index bf1d7f9c951..dde8630d690 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql @@ -262,6 +262,7 @@ SELECT pool, blockchain, project, + null as fee, time, main_token, main_token_symbol, diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql index da3e364afd4..34f03396cf0 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql @@ -263,6 +263,7 @@ select blockchain||' '||project||' '||coalesce(paired_token_symbol,'unknown')|| pool, blockchain, project, + null as fee, time, main_token, main_token_symbol, From c1b141447769e3b3f70f7f8c0133e7f897f3f79c Mon Sep 17 00:00:00 2001 From: ppclunghe Date: Thu, 3 Oct 2024 09:23:34 +0200 Subject: [PATCH 3/3] fix fees --- .../lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql | 2 +- .../lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql | 2 +- .../lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql index 829273e4cc7..dc8e4661d0c 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/bnb/lido_liquidity_bnb_thena_pools.sql @@ -216,7 +216,7 @@ group by 1,2 ) , all_metrics as ( -select l.pool, pools.blockchain, pools.project, null as fee, cast(l.time as date) as time, +select l.pool, pools.blockchain, pools.project, 0 as fee, cast(l.time as date) as time, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then tokenA else tokenB end main_token, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then p0.symbol else p1.symbol end main_token_symbol, case when tokenA = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C then tokenB else tokenA end paired_token, diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql index dde8630d690..eaac00e1961 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/linea/lido_liquidity_linea_lynex_pools.sql @@ -262,7 +262,7 @@ SELECT pool, blockchain, project, - null as fee, + 0 as fee, time, main_token, main_token_symbol, diff --git a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql index 34f03396cf0..15c4e0d5b5e 100644 --- a/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql +++ b/dbt_subprojects/hourly_spellbook/models/_project/lido/liquidity/scroll/lido_liquidity_scroll_nuri_pools.sql @@ -263,7 +263,7 @@ select blockchain||' '||project||' '||coalesce(paired_token_symbol,'unknown')|| pool, blockchain, project, - null as fee, + 0 as fee, time, main_token, main_token_symbol,