These scripts are designed to scrape Aave data from an Ethereum archive node. There are two ways we scrape data:
- We get historical balances by querying the Aave Protocol data provider contracts at historical block heights. This includes
- We get event data, by parsing the events emitted by different Aave contracts, using our tool get_contract_logs.py, which grabs all the events emitted by a target contract
- get_atoken_transfers_v2.py gets all the transfer events from all the Aave aTokens
- get_atoken_transfers_v3.py gets all the transfer events from all the Aave aTokens
- get_lending_pool_events_v2.py gets all the transfer events from all the Aave aTokens
- get_lending_pool_events_v3.py gets all the transfer events from all the Aave aTokens
Aave v2 provides a Protocol Data Provider Contract which provides many useful aggregate statistics.
- get_atokens.py calls the function getAllReservesTokens() to get a list of all the reserve assets and their corresponding aTokens. It writes the resulting list to aave_atokens_v2.csv.
- get_collateralization_meta_v2.py calls the function getReserveConfigurationData for each reserve asset provided by getAllReservesTokens()
- get_collateralization_v2.py calls the function getReserveData for each reserve asset provided by getAllReservesTokens()
Aave v3 provides a Protocol Data Provider Contract which provides many useful aggregate statistics.
- get_atokens.py calls the function getAllReservesTokens() to get a list of all the reserve assets and their corresponding aTokens. It writes the resulting list to aave_atokens_v3.csv.
- get_collateralization_meta_v3.py calls the function getReserveConfigurationData for each reserve asset provided by getAllReservesTokens()
- get_collateralization_v3.py calls the function getReserveData for each reserve asset provided by getAllReservesTokens()