diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/_schema.yml index 3b95eb63415..1cc18741e53 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/_schema.yml @@ -201,6 +201,44 @@ models: - *tx_hash - *evt_index + - name: aave_lido_v3_ethereum_base_borrow + meta: + blockchain: ethereum + sector: lending + project: aave_lido + contributors: tomfutago + config: + tags: ['lending', 'borrow', 'aave', 'lido', 'v3', 'ethereum'] + description: "Aave v3 borrow transactions on Ethereum" + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - transaction_type + - token_address + - tx_hash + - evt_index + - check_lending_base_borrow_seed: + seed_file: ref('aave_lido_ethereum_base_borrow_seed') + filter: + version: 3 + columns: + - *blockchain + - *project + - *version + - *transaction_type + - *token_address + - *borrower + - *on_behalf_of + - *repayer + - *liquidator + - *amount + - *block_month + - *block_time + - *block_number + - *project_contract_address + - *tx_hash + - *evt_index + - name: compound_v1_ethereum_base_borrow meta: blockchain: ethereum diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/lending_ethereum_base_borrow.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/lending_ethereum_base_borrow.sql index b6aec6c790f..4ae598e2a2c 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/lending_ethereum_base_borrow.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/lending_ethereum_base_borrow.sql @@ -11,6 +11,7 @@ ref('aave_v1_ethereum_base_borrow'), ref('aave_v2_ethereum_base_borrow'), ref('aave_v3_ethereum_base_borrow'), + ref('aave_lido_v3_ethereum_base_borrow'), ref('compound_v1_ethereum_base_borrow'), ref('compound_v2_ethereum_base_borrow'), ref('compound_v3_ethereum_base_borrow'), diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/platforms/aave_lido_v3_ethereum_base_borrow.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/platforms/aave_lido_v3_ethereum_base_borrow.sql new file mode 100644 index 00000000000..d70bc33a8ef --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/borrow/ethereum/platforms/aave_lido_v3_ethereum_base_borrow.sql @@ -0,0 +1,20 @@ +{{ + config( + schema = 'aave_lido_v3_ethereum', + alias = 'base_borrow', + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['transaction_type', 'token_address', 'tx_hash', 'evt_index'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] + ) +}} + +{{ + lending_aave_v3_compatible_borrow( + blockchain = 'ethereum', + project = 'aave_lido', + version = '3', + decoded_contract_name = 'LidoPool' + ) +}} diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/_schema.yml index 67c1924ca0c..6834502a7f4 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/_schema.yml @@ -172,6 +172,39 @@ models: - *tx_hash - *evt_index + - name: aave_lido_v3_ethereum_base_flashloans + meta: + blockchain: ethereum + sector: lending + project: aave_lido + contributors: tomfutago + config: + tags: ['lending', 'flashloans', 'aave', 'lido', 'ethereum'] + description: "Aave v3 flashloans transactions on Ethereum" + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - tx_hash + - evt_index + - check_lending_base_flashloans_seed: + seed_file: ref('aave_lido_ethereum_base_flashloans_seed') + filter: + version: 3 + columns: + - *blockchain + - *project + - *version + - *recipient + - *amount + - *fee + - *token_address + - *project_contract_address + - *block_month + - *block_time + - *block_number + - *tx_hash + - *evt_index + - name: radiant_ethereum_base_flashloans meta: blockchain: ethereum diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/lending_ethereum_base_flashloans.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/lending_ethereum_base_flashloans.sql index dc79206488b..56f82efeaad 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/lending_ethereum_base_flashloans.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/lending_ethereum_base_flashloans.sql @@ -11,6 +11,7 @@ ref('aave_v1_ethereum_base_flashloans'), ref('aave_v2_ethereum_base_flashloans'), ref('aave_v3_ethereum_base_flashloans'), + ref('aave_lido_v3_ethereum_base_flashloans'), ref('radiant_ethereum_base_flashloans'), ref('uwulend_ethereum_base_flashloans'), ref('spark_ethereum_base_flashloans'), diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/platforms/aave_lido_v3_ethereum_base_flashloans.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/platforms/aave_lido_v3_ethereum_base_flashloans.sql new file mode 100644 index 00000000000..e101b5a57d2 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/flashloans/ethereum/platforms/aave_lido_v3_ethereum_base_flashloans.sql @@ -0,0 +1,20 @@ +{{ + config( + schema = 'aave_lido_v3_ethereum', + alias = 'base_flashloans', + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['tx_hash', 'evt_index'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] + ) +}} + +{{ + lending_aave_v3_compatible_flashloans( + blockchain = 'ethereum', + project = 'aave_lido', + version = '3', + decoded_contract_name = 'LidoPool' + ) +}} diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/_schema.yml index 48aa4b7b3bf..91be773e8bc 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/_schema.yml @@ -201,6 +201,44 @@ models: - *tx_hash - *evt_index + - name: aave_lido_v3_ethereum_base_supply + meta: + blockchain: ethereum + sector: lending + project: aave_lido + contributors: tomfutago + config: + tags: ['lending', 'supply', 'aave', 'lido', 'ethereum'] + description: "Aave v3 supply transactions on Ethereum" + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - transaction_type + - token_address + - tx_hash + - evt_index + - check_lending_base_supply_seed: + seed_file: ref('aave_lido_ethereum_base_supply_seed') + filter: + version: 3 + columns: + - *blockchain + - *project + - *version + - *transaction_type + - *token_address + - *depositor + - *on_behalf_of + - *withdrawn_to + - *liquidator + - *amount + - *block_month + - *block_time + - *block_number + - *project_contract_address + - *tx_hash + - *evt_index + - name: compound_v2_ethereum_base_supply meta: blockchain: ethereum diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/lending_ethereum_base_supply.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/lending_ethereum_base_supply.sql index 068fec75880..fb90b03ccf6 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/lending_ethereum_base_supply.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/lending_ethereum_base_supply.sql @@ -11,6 +11,7 @@ ref('aave_v1_ethereum_base_supply'), ref('aave_v2_ethereum_base_supply'), ref('aave_v3_ethereum_base_supply'), + ref('aave_lido_v3_ethereum_base_supply'), ref('compound_v2_ethereum_base_supply'), ref('compound_v3_ethereum_base_supply'), ref('radiant_ethereum_base_supply'), diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/platforms/aave_lido_v3_ethereum_base_supply.sql b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/platforms/aave_lido_v3_ethereum_base_supply.sql new file mode 100644 index 00000000000..2d19eebd8c1 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/lending/supply/ethereum/platforms/aave_lido_v3_ethereum_base_supply.sql @@ -0,0 +1,20 @@ +{{ + config( + schema = 'aave_lido_v3_ethereum', + alias = 'base_supply', + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['transaction_type', 'token_address', 'tx_hash', 'evt_index'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] + ) +}} + +{{ + lending_aave_v3_compatible_supply( + blockchain = 'ethereum', + project = 'aave_lido', + version = '3', + decoded_contract_name = 'LidoPool' + ) +}} diff --git a/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/_schema.yml b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/_schema.yml index 9df69a48fb6..51c103b4d09 100644 --- a/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/_schema.yml @@ -56,6 +56,20 @@ seeds: token_address: varbinary borrower: varbinary amount: double + - name: aave_lido_ethereum_base_borrow_seed + config: + column_types: + blockchain: varchar + project: varchar + version: varchar + block_number: bigint + block_time: timestamp + tx_hash: varbinary + evt_index: bigint + transaction_type: varchar + token_address: varbinary + borrower: varbinary + amount: double - name: aave_fantom_base_borrow_seed config: column_types: @@ -197,6 +211,20 @@ seeds: token_address: varbinary depositor: varbinary amount: double + - name: aave_lido_ethereum_base_supply_seed + config: + column_types: + blockchain: varchar + project: varchar + version: varchar + block_number: bigint + block_time: timestamp + tx_hash: varbinary + evt_index: bigint + transaction_type: varchar + token_address: varbinary + depositor: varbinary + amount: double - name: aave_fantom_base_supply_seed config: column_types: @@ -334,6 +362,19 @@ seeds: token_address: varbinary recipient: varbinary amount: double + - name: aave_lido_ethereum_base_flashloans_seed + config: + column_types: + blockchain: varchar + project: varchar + version: varchar + block_number: bigint + block_time: timestamp + tx_hash: varbinary + evt_index: bigint + token_address: varbinary + recipient: varbinary + amount: double - name: aave_fantom_base_flashloans_seed config: column_types: diff --git a/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_borrow_seed.csv b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_borrow_seed.csv new file mode 100644 index 00000000000..fc67b4ca44b --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_borrow_seed.csv @@ -0,0 +1,3 @@ +blockchain,project,version,block_number,block_time,tx_hash,evt_index,transaction_type,token_address,borrower,amount +ethereum,aave_lido,3,20454208,2024-08-04 09:11:11.000 UTC,0x0bd845c9d078294327207457e91c6dc625c689c0044452953f7c630764c828d0,365,borrow,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x702b6770a81f75964ca5d479f369efb31dfa7c32,2.8808742499190137e+19 +ethereum,aave_lido,3,20452066,2024-08-04 02:01:47.000 UTC,0x81d24a63c44b347b56947ba36da82862c526390acf4474bd4fcb7702868c4a37,172,repay,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x3ee505ba316879d246a8fd2b3d7ee63b51b44fab,-2.0292e+20 diff --git a/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_flashloans_seed.csv b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_flashloans_seed.csv new file mode 100644 index 00000000000..2b159c58fc6 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_flashloans_seed.csv @@ -0,0 +1,4 @@ +blockchain,project,version,block_number,block_time,tx_hash,evt_index,token_address,recipient,amount +ethereum,aave_lido,3,20446968,2024-08-03 08:58:23.000 UTC,0x35bfa5ce81ad9a9bb6f9240b290d8d5027a8a627a6756acd2c43ebba14d86bfc,86,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xe695175eaed06836f22d363fa4ddd82dc1d944c9,1.4888478115921598e+21 +ethereum,aave_lido,3,20444445,2024-08-03 00:30:11.000 UTC,0x14e516091c35101aa3db12f67100b118223e2c49052950c4ae0ccd8ba5bd63cd,465,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x4afc4d809c7a7f0c2f647da3a89a54573d001703,1.3e+19 +ethereum,aave_lido,3,20443133,2024-08-02 20:05:35.000 UTC,0xf0eda867753757c6576b8a567b49cf7d21862de01c851cdc50765cadef019f3e,180,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xcfd23170c2a4fdff9b03493056d71aa275468fe8,1.8075e+22 diff --git a/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_supply_seed.csv b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_supply_seed.csv new file mode 100644 index 00000000000..520030237ca --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/seeds/_sector/lending/aave_lido_ethereum_base_supply_seed.csv @@ -0,0 +1,3 @@ +blockchain,project,version,block_number,block_time,tx_hash,evt_index,transaction_type,token_address,depositor,amount +ethereum,aave_lido,3,20454405,2024-08-04 09:50:35.000 UTC,0x42345feb96d2e4e0230b2d272f31ed186c30e0adde9e1ca1aeed5a70da56d08b,362,deposit,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x702b6770a81f75964ca5d479f369efb31dfa7c32,3.1706e+21 +ethereum,aave_lido,3,20454215,2024-08-04 09:12:35.000 UTC,0xe4924cb7355e0994d2b288acbbe08e4bdaaaad561de9060f64a08924c2493ad4,357,withdraw,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0x702b6770a81f75964ca5d479f369efb31dfa7c32,-7e+18 diff --git a/sources/_sector/lending/borrow/ethereum/_sources.yml b/sources/_sector/lending/borrow/ethereum/_sources.yml index b4a2204eb00..43d886d8a84 100644 --- a/sources/_sector/lending/borrow/ethereum/_sources.yml +++ b/sources/_sector/lending/borrow/ethereum/_sources.yml @@ -18,6 +18,9 @@ sources: - name: Pool_evt_Borrow - name: Pool_evt_Repay - name: Pool_evt_LiquidationCall + - name: LidoPool_evt_Borrow + - name: LidoPool_evt_Repay + - name: LidoPool_evt_LiquidationCall - name: compound_v1_ethereum tables: diff --git a/sources/_sector/lending/flashloans/ethereum/_sources.yml b/sources/_sector/lending/flashloans/ethereum/_sources.yml index d21c7d1eaaf..0eddafb8db7 100644 --- a/sources/_sector/lending/flashloans/ethereum/_sources.yml +++ b/sources/_sector/lending/flashloans/ethereum/_sources.yml @@ -12,6 +12,7 @@ sources: - name: aave_v3_ethereum tables: - name: Pool_evt_FlashLoan + - name: LidoPool_evt_FlashLoan - name: radiant_capital_ethereum tables: diff --git a/sources/_sector/lending/supply/ethereum/_sources.yml b/sources/_sector/lending/supply/ethereum/_sources.yml index 0c8bc86aa22..b24a866deae 100644 --- a/sources/_sector/lending/supply/ethereum/_sources.yml +++ b/sources/_sector/lending/supply/ethereum/_sources.yml @@ -17,6 +17,9 @@ sources: - name: Pool_evt_Supply - name: Pool_evt_Withdraw - name: Pool_evt_ReserveDataUpdated + - name: LidoPool_evt_Supply + - name: LidoPool_evt_Withdraw + - name: LidoPool_evt_ReserveDataUpdated - name: compound_v2_ethereum tables: