# Research Question Formulation
## Objective
RQ1: Can this dataset be applied to different machine learning models?
RQ2: Can this dataset be extended to apply to other algorithms, enhancing its utility and revealing additional insights in financial market analysis?
## Significance
Our analysis indicates that among the four machine learning models evaluated, DNN demonstrated the best prediction performance in both fungible token airdrop and normal periods. Specifically, DNN models showed superior predictive accuracy for gas usage during these periods. The results highlighted minimal disparity in prediction loss when comparing a DNN trained on data from normal periods to a DNN trained on data specifically from the token-airdrop period. This finding suggests that DNN models exhibit robust scalability on this dataset, eliminating the need to train a new neural network specifically for token-airdrop events. In addition to evaluating DNN models, we explored the extensibility of incorporating monotonicity constraints and sentiment analysis within the Neural Additive Model (NAM). Although these enhancements did not significantly improve the predictive accuracy of the NAM model on our test dataset, the intrinsic variability and complexity of blockchain data imply that different datasets from different time periods might yield different results. This opens a significant platform for other researchers to utilize and further explore the dataset, enabling comprehensive analyses and advancing financial machine-learning models. Our contributions include developing a comprehensive dataset that integrates both on-chain and off-chain data, compatible with various machine learning algorithms for financial prediction. This dataset forms the cornerstone of a novel research framework, enabling a deeper exploration of the financial market and its mechanisms. By offering a robust and versatile dataset, we facilitate advanced exploration and optimization efforts, driving innovation and enhancing the accuracy and reliability of financial machine-learning models in blockchain technology.
### Data Selection
We query Ethereum’s data using Google BigQuery. The raw data contains information on timestamps, block numbers, hash, parent hash, transaction, etc. Since our research aims to predict gas used in the next block, we only keep the relevant features, including time stamp, block number, gas limit, gas used, and base fee. Notably, the token-airdrop can substantially boost recipients' and non-recipients' engagement levels in the transactions. As a result, high volatility in gas used will occur and lead to subsequent base fee alternation. Hence, our research is structured around two distinct periods. The first period spans the apex of the ARB airdrop, recognized as the most substantial in 2023, from March 21 to April 1, encompassing 78290 blocks. The second period pertains to the month devoid of significant token-airdrop activities, spanning from June 1st, 2023, to July 1st, 2023, and containing 213244 blocks.
We also query the discord data. ### Data #### On-chain data We utilize Google BigQuery to extract Ethereum's blockchain data, including timestamps, block numbers, hashes, parent hashes, transactions, etc. We retain only the pertinent features to predict gas usage in forthcoming blocks: timestamp, gas limit, gas used, and base fee. We exclude other variables, such as transaction numbers, despite their high correlation with gas usage, based on our specific research focus. Furthermore, our study acknowledges the impact of token airdrops on transaction engagement levels for recipients and non-recipients. According to Guo\cite{guo2023spillover}, token airdrops can significantly influence engagement, resulting in pronounced gas usage volatility and subsequent base fee fluctuations. Consequently, our analysis is bifurcated into two distinct periods. The first period examines the ARB token airdrop, the most substantial airdrop event in 2023, which occurred from March 21 to April 1 and comprised 78,290 blocks. The second period, devoid of significant fungible token airdrop activities, extends from June 1, 2023, to July 1, 2023, encompassing 213,244 blocks. This temporal delineation allows for a comprehensive analysis of the effects of significant airdrop events on Ethereum's gas dynamics.
| Variable Name | Description | Unit | Type |
|---|---|---|---|
| timestamp | Recording of the time of each block | String | |
| number | The number of blocks on the chain | Numeric | |
| gas_used | Actual Gas Used | Gwei | Numeric |
| gas_limit | The maximum allowed gas per block | Gwei | Numeric |
| base_fee_per_gas | The base fee set for each block | Ether | Numeric |
| gas_fraction | Fraction between Gas Used and Gas Limit | Numeric | |
| gas_target | The optimal gas used for each block | Numeric | |
| Y | Normalized Gas Used | Numeric | |
| $Y_t$ | Response variable equals to the gas_fraction | Numeric |
In the original dataset, the base fee is denominated in units of Gwei, where each Gwei is equivalent to $10^{-9}$ Ether. Consequently, for enhanced interpretability of the dataset, we scale the base fee by $10^{-9}$, expressing it in terms of Ether.
We create a regressor, denoted as $\alpha$, by computing the ratio of gas used to the gas limit. The predicted variable $Y$ represents the normalized gas used, determined by the formula:
\[ Y = \frac{{\text{{gasUsed}} - \text{{gasTarget}}}}{{\text{{gasTarget}}}} \]
For varying periods $k$, the regressor variable for the preceding $k$ data points is collected into a list, forming the feature set $X$. The variable $Y$ corresponds precisely to the prediction variable for the data point at time $t$.
| AuthorID | Date | Content | Attach |
|---|---|---|---|
| 301186049323958272 | 2019-08-24 13:47 | If you believe that each of these stable coins are eventually stable though, then you'll make money on the swinging back and forth. | NA |
| 510252034310799360 | 2019-08-24 14:59 | Heh, I was imagining a world where the pool has more liquidity than the rest of the market participants combined. Your, actually realistic, scenario makes it a little difficult for pool participants to exit. | NA |
| 589621262733672448 | 2019-08-24 17:02 | I kinda prefer variable price. | NA |