Update README.md
Browse files
README.md
CHANGED
@@ -11,94 +11,37 @@ Decentralized finance (DeFi) has emerged as a significant sector within the bloc
|
|
11 |
|
12 |
---
|
13 |
# About Dataset
|
14 |
-
This dataset encompasses several steps involved in preparing data to analyze decentralized finance (DeFi) protocols and transactions. The process of building the dataset involves collecting data from various DeFi protocols, extracting relevant contract data, gathering transaction information, and aggregating market data.
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
# Features
|
32 |
-
#### 1. General Information
|
33 |
-
- `address`: Unique address of the user on the blockchain.
|
34 |
-
|
35 |
-
#### 2. Transaction Activity
|
36 |
-
- `received_count`: Total number of transactions received.
|
37 |
-
- `total_received_eth`: Total amount of ETH received.
|
38 |
-
- `sent_count`: Total number of transactions sent.
|
39 |
-
- `total_sent_eth`: Total amount of ETH sent.
|
40 |
-
|
41 |
-
#### 3. Types of Interaction with Protocols
|
42 |
-
- `type_dex`: Indicates whether the user interacts with DEXs (Decentralized Exchanges).
|
43 |
-
- `type_lending`: Indicates whether the user interacts with lending protocols.
|
44 |
-
- `type_stablecoin`: Indicates whether the user interacts with stablecoins.
|
45 |
-
- `type_yield_farming`: Indicates whether the user participates in yield farming.
|
46 |
-
- `type_nft_fi`: Indicates whether the user interacts with NFT-Fi protocols.
|
47 |
-
|
48 |
-
#### 4. Engagement with Specific Protocols
|
49 |
-
(Number of transactions made on each protocol)
|
50 |
-
- `curve_dao_count`
|
51 |
-
- `aave_count`
|
52 |
-
- `tether_count`
|
53 |
-
- `uniswap_count`
|
54 |
-
- `maker_count`
|
55 |
-
- `yearn_finance_count`
|
56 |
-
- `usdc_count`
|
57 |
-
- `dai_count`
|
58 |
-
- `balancer_count`
|
59 |
-
- `harvest_finance_count`
|
60 |
-
- `nftfi_count`
|
61 |
-
|
62 |
-
#### 5. User Diversity and Influence
|
63 |
-
- `protocol_type_diversity`: Number of different protocol types used by the user.
|
64 |
-
- `protocol_name_diversity`: Number of unique protocols used by the user.
|
65 |
-
- `net_flow_eth`: Difference between ETH sent and ETH received.
|
66 |
-
- `whale_score`: A score indicating whether the user is a large fund holder.
|
67 |
-
|
68 |
-
#### 6. Sent Transaction Statistics
|
69 |
-
(Minimum, average, median, maximum values, and standard deviations)
|
70 |
-
- `min_sent_eth`, `avg_sent_eth`, `med_sent_eth`, `max_sent_eth`, `std_sent_eth`: Statistics on amounts sent in ETH.
|
71 |
-
- `min_sent_gas`, `avg_sent_gas`, `med_sent_gas`, `max_sent_gas`, `std_sent_gas`: Statistics on gas used for sent transactions.
|
72 |
-
- `avg_gas_efficiency_sent`: Average gas efficiency for sent transactions.
|
73 |
-
- `peak_hour_sent`: Time of day when the user sends the most transactions.
|
74 |
-
- `peak_count_sent`: Maximum number of transactions sent during a given hour.
|
75 |
-
- `tx_frequency_sent`: Average frequency of sent transactions.
|
76 |
-
|
77 |
-
#### 7. Received Transaction Statistics
|
78 |
-
(Same structure as for sent transactions)
|
79 |
-
- `min_received_eth`, `avg_received_eth`, `med_received_eth`, `max_received_eth`, `std_received_eth`: Statistics on amounts received in ETH.
|
80 |
-
- `min_received_gas`, `avg_received_gas`, `med_received_gas`, `max_received_gas`, `std_received_gas`: Statistics on gas used for received transactions.
|
81 |
-
- `avg_gas_efficiency_received`: Average gas efficiency for received transactions.
|
82 |
-
- `peak_hour_received`: Time of day when the user receives the most transactions.
|
83 |
-
- `peak_count_received`: Maximum number of transactions received during a given hour.
|
84 |
-
- `tx_frequency_received`: Average frequency of received transactions.
|
85 |
-
|
86 |
-
#### 8. Exposure to Market Protocols
|
87 |
-
(Evaluation of the user's risk and influence based on the market)
|
88 |
-
- `total_volume_exposure`: Total exposure to the transaction volume of protocols.
|
89 |
-
- `total_volatility_exposure`: Exposure to price volatility of protocols.
|
90 |
-
- `total_gas_exposure`: Exposure to the average gas costs on used protocols.
|
91 |
-
- `total_error_exposure`: Exposure to transaction errors of protocols.
|
92 |
-
- `total_liquidity_exposure`: Exposure to protocol liquidity.
|
93 |
-
- `total_activity_exposure`: Exposure to global transaction activity of protocols.
|
94 |
-
- `total_user_adoption_exposure`: Exposure to the number of active users on protocols.
|
95 |
-
- `total_gas_volatility_exposure`: Exposure to gas volatility used on protocols.
|
96 |
-
- `total_error_volatility_exposure`: Exposure to the variability of transaction errors.
|
97 |
-
- `total_high_value_exposure`: Exposure to high-value transactions on protocols.
|
98 |
|
99 |
---
|
100 |
-
##
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
---
|
104 |
## Source
|
@@ -110,16 +53,16 @@ Tools used in this process:
|
|
110 |
4. **MongoDB** - For managing and storing large volumes of transaction and protocol data in a structured format.
|
111 |
5. **Ethereum Blockchain** - For the decentralized financial infrastructure that powers these protocols and transactions.
|
112 |
|
113 |
-
Code is available on [GitHub](https://github.com/mriusero/defi-user-behavior-clustering) and
|
114 |
|
115 |
---
|
116 |
## Subsets
|
117 |
|
118 |
### `users.parquet`
|
119 |
-
This file focuses on user-level data and is aimed at answering questions related to user behavior, activity trends, and protocol interactions. Potential use cases include:
|
120 |
-
- Analyzing the lifecycle of user activity in DeFi.
|
121 |
-
- Identifying power users or dormant users.
|
122 |
-
- Mapping the interaction between users and various protocols.
|
123 |
---
|
124 |
- **`address`** *(string)*: The wallet address of the user.
|
125 |
- **`first_seen`** *(datetime)*: The first recorded activity of the user.
|
@@ -135,10 +78,10 @@ This file focuses on user-level data and is aimed at answering questions related
|
|
135 |
---
|
136 |
|
137 |
### `market.parquet`
|
138 |
-
This file aggregates market-related data over time intervals, offering insights into protocol performance and market dynamics. Objectives include:
|
139 |
-
- Understanding market trends across DeFi protocols and tokens.
|
140 |
-
- Analyzing trading volumes, transaction activity, and price fluctuations.
|
141 |
-
- Identifying periods of high or low activity for specific tokens or protocols.
|
142 |
---
|
143 |
- **`timestamp`** *(datetime)*: The time when the data was recorded.
|
144 |
- **`blockchain`** *(string)*: The blockchain network (e.g., Ethereum, Binance Smart Chain).
|
@@ -171,10 +114,10 @@ This file aggregates market-related data over time intervals, offering insights
|
|
171 |
---
|
172 |
|
173 |
### `transactions.parquet`
|
174 |
-
This file provides granular transaction-level data, which is crucial for understanding the flow of assets within the DeFi ecosystem. Applications include:
|
175 |
-
- Tracing the movement of funds between addresses.
|
176 |
-
- Analyzing transaction costs (gas) and failure rates.
|
177 |
-
- Identifying anomalous or fraudulent transactions.
|
178 |
---
|
179 |
- **`timestamp`** *(datetime)*: The time when the transaction occurred.
|
180 |
- **`transaction_hash`** *(string)*: The unique hash identifying the transaction.
|
@@ -190,10 +133,10 @@ This file provides granular transaction-level data, which is crucial for underst
|
|
190 |
---
|
191 |
|
192 |
### `contracts.parquet`
|
193 |
-
This file documents details about the smart contracts associated with various DeFi protocols. It supports:
|
194 |
-
- Categorizing contracts by protocol, type, and use case.
|
195 |
-
- Analyzing the adoption of specific contract standards (e.g., ERC-20, ERC-721).
|
196 |
-
- Exploring the relationship between contract attributes and protocol performance.
|
197 |
---
|
198 |
- **`contract_address`** *(string)*: The unique address of the smart contract.
|
199 |
- **`blockchain`** *(string)*: The blockchain network where the contract is deployed.
|
|
|
11 |
|
12 |
---
|
13 |
# About Dataset
|
14 |
+
This dataset encompasses several steps involved in preparing data to analyze decentralized finance (DeFi) protocols and transactions. The process of building the dataset involves collecting data from various DeFi protocols, extracting relevant contract data, gathering transaction information, and aggregating market data.
|
15 |
|
16 |
+
Specifically, the scope focuses on the following types of DeFi protocols on the `Ethereum blockchain`:
|
17 |
|
18 |
+
- **Decentralized Exchanges (DEX)**: *`Uniswap`, `Curve DAO`, `Balancer`*
|
19 |
+
- **Lending Platforms**: *`Aave`, `Maker`*
|
20 |
+
- **Stablecoins**: *`Tether`, `USD Coin (USDC)`, `Dai`*
|
21 |
+
- **Yield Farming**: *`Yearn Finance`, `Harvest Finance`*
|
22 |
+
- **Non-Fungible Token (NFT)**: *`NFTfi`*
|
23 |
|
24 |
+
Four files serves a distinct purpose and is carefully structured to facilitate deeper insights into the DeFi landscape:
|
25 |
|
26 |
+
βββ contracts.parquet # Contains contract details for selected DeFi protocols.
|
27 |
+
βββ transactions.parquet # Contains transaction data for Ethereum-based contracts.
|
28 |
+
βββ market.parquet # Contains enriched market data with aggregated transaction metrics.
|
29 |
+
βββ users.parquet # User profiles based on transaction data.
|
30 |
|
31 |
+
Also, features have been aggregated to capture users behaviors and protocols interactions, and the documentation is available [here](https://github.com/mriusero/defi-user-behavior-clustering/blob/main/docs/features.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
---
|
34 |
+
## Metrics
|
35 |
+
|
36 |
+
The metrics associated with the dataset are as follows:
|
37 |
+
|
38 |
+
- **First Date:** December 31, 2022, at 22:59:59 UTC
|
39 |
+
- **Last Date:** December 30, 2024, at 23:00:11 UTC
|
40 |
+
- **Number of Protocols:** 11
|
41 |
+
- **Number of Protocol Types:** 5
|
42 |
+
- **Number of Unique Transactions:** 22,682,739
|
43 |
+
- **Number of Unique Users/Addresses:** 6,876,845
|
44 |
+
- **Total Market Hours:** 177,955
|
45 |
|
46 |
---
|
47 |
## Source
|
|
|
53 |
4. **MongoDB** - For managing and storing large volumes of transaction and protocol data in a structured format.
|
54 |
5. **Ethereum Blockchain** - For the decentralized financial infrastructure that powers these protocols and transactions.
|
55 |
|
56 |
+
Code is available on [GitHub](https://github.com/mriusero/defi-user-behavior-clustering) and ETL process documentation is explained [here](https://github.com/mriusero/defi-user-behavior-clustering/blob/main/docs/etl_pipeline_flow.md).
|
57 |
|
58 |
---
|
59 |
## Subsets
|
60 |
|
61 |
### `users.parquet`
|
62 |
+
This file focuses on user-level data and is aimed at answering questions related to user behavior, activity trends, and protocol interactions. Potential use cases include:
|
63 |
+
- Analyzing the lifecycle of user activity in DeFi.
|
64 |
+
- Identifying power users or dormant users.
|
65 |
+
- Mapping the interaction between users and various protocols.
|
66 |
---
|
67 |
- **`address`** *(string)*: The wallet address of the user.
|
68 |
- **`first_seen`** *(datetime)*: The first recorded activity of the user.
|
|
|
78 |
---
|
79 |
|
80 |
### `market.parquet`
|
81 |
+
This file aggregates market-related data over time intervals, offering insights into protocol performance and market dynamics. Objectives include:
|
82 |
+
- Understanding market trends across DeFi protocols and tokens.
|
83 |
+
- Analyzing trading volumes, transaction activity, and price fluctuations.
|
84 |
+
- Identifying periods of high or low activity for specific tokens or protocols.
|
85 |
---
|
86 |
- **`timestamp`** *(datetime)*: The time when the data was recorded.
|
87 |
- **`blockchain`** *(string)*: The blockchain network (e.g., Ethereum, Binance Smart Chain).
|
|
|
114 |
---
|
115 |
|
116 |
### `transactions.parquet`
|
117 |
+
This file provides granular transaction-level data, which is crucial for understanding the flow of assets within the DeFi ecosystem. Applications include:
|
118 |
+
- Tracing the movement of funds between addresses.
|
119 |
+
- Analyzing transaction costs (gas) and failure rates.
|
120 |
+
- Identifying anomalous or fraudulent transactions.
|
121 |
---
|
122 |
- **`timestamp`** *(datetime)*: The time when the transaction occurred.
|
123 |
- **`transaction_hash`** *(string)*: The unique hash identifying the transaction.
|
|
|
133 |
---
|
134 |
|
135 |
### `contracts.parquet`
|
136 |
+
This file documents details about the smart contracts associated with various DeFi protocols. It supports:
|
137 |
+
- Categorizing contracts by protocol, type, and use case.
|
138 |
+
- Analyzing the adoption of specific contract standards (e.g., ERC-20, ERC-721).
|
139 |
+
- Exploring the relationship between contract attributes and protocol performance.
|
140 |
---
|
141 |
- **`contract_address`** *(string)*: The unique address of the smart contract.
|
142 |
- **`blockchain`** *(string)*: The blockchain network where the contract is deployed.
|