Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Aave v3 Lido market to lending sector #6493

Merged
merged 5 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
)
}}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
)
}}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
)
}}
41 changes: 41 additions & 0 deletions dbt_subprojects/hourly_spellbook/seeds/_sector/lending/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions sources/_sector/lending/borrow/ethereum/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions sources/_sector/lending/flashloans/ethereum/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sources:
- name: aave_v3_ethereum
tables:
- name: Pool_evt_FlashLoan
- name: LidoPool_evt_FlashLoan

- name: radiant_capital_ethereum
tables:
Expand Down
3 changes: 3 additions & 0 deletions sources/_sector/lending/supply/ethereum/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading