Update method/Readme.md
Browse files- method/Readme.md +17 -5
method/Readme.md
CHANGED
|
@@ -16,18 +16,13 @@ Our analysis indicates that among the four machine learning models evaluated, DN
|
|
| 16 |
### Data
|
| 17 |
#### On-chain data
|
| 18 |
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.
|
| 19 |
-
# Operational Measures
|
| 20 |
|
| 21 |
-
## Variables
|
| 22 |
<!DOCTYPE html>
|
| 23 |
<html lang="en">
|
| 24 |
<head>
|
| 25 |
<meta charset="UTF-8">
|
| 26 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
|
| 32 |
</head>
|
| 33 |
<body>
|
|
@@ -99,9 +94,26 @@ We utilize Google BigQuery to extract Ethereum's blockchain data, including time
|
|
| 99 |
</body>
|
| 100 |
</html>
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
#### Off-chain data
|
| 103 |
Another dataset is users' discussion text from Discord. Discord hosts vibrant crypto discussions ranging from market analysis to technical debates, yet remains underexplored for sentiment analysis, unlike platforms like Twitter and Reddit, where extensive studies in cryptocurrency sentiment research exist \cite{kraaijeveld2020predictive,mohapatra2019kryptooracle,khan2022business}. We focus on critical communities such as Binance, Uniswap, and the Ethereum Dev channels on Discord. These are the communities for the largest centralized exchange, decentralized exchanges, and Ethereum developers, respectively. Analyzing sentiments from these communities, which influence Ethereum's network activity and gas usage through trading dynamics and developer engagement, provides crucial insights for predicting future gas demand and formulating effective network management strategies. The discussion texts are queries from Discord using the DiscordChatExporter, an open-source tool on GitHub.
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
### Monotonicity
|
| 106 |
we propose a novel method for predicting gas usage in blockchain transactions, inspired by the concept of pairwise monotonicity as detailed by Chen \cite{chen2023address}. Unlike traditional methods like EMA, which emphasizes the forgetting of older information, our approach employs a monotonicity representation to attribute varying levels of importance to data over time. Monotonicity has demonstrated its interdisciplinary applicability, as evidenced by works such as Liu et al. \cite{liu2020certified} and Milani \cite{milani2016fast}, which focused on individual monotonicity for single variables. Our method is inspired by Chen's work \cite{chen2023address} for introducing pairwise monotonicity in the financial domain. For instance, past due amounts over a longer period in credit scoring should more significantly impact the scoring of new debt risk. Similarly, older data points are less influential in blockchain transactions, whereas recent data points are more critical for prediction.
|
| 107 |
|
|
|
|
| 16 |
### Data
|
| 17 |
#### On-chain data
|
| 18 |
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.
|
|
|
|
| 19 |
|
|
|
|
| 20 |
<!DOCTYPE html>
|
| 21 |
<html lang="en">
|
| 22 |
<head>
|
| 23 |
<meta charset="UTF-8">
|
| 24 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
</head>
|
| 28 |
<body>
|
|
|
|
| 94 |
</body>
|
| 95 |
</html>
|
| 96 |
|
| 97 |
+
#### Data processing
|
| 98 |
+
<p>In the original dataset, the base fee is denominated in units of Gwei, where each Gwei is equivalent to <code>$10^{-9}$</code> Ether. Consequently, for enhanced interpretability of the dataset, we scale the base fee by <code>$10^{-9}$</code>, expressing it in terms of Ether.</p>
|
| 99 |
+
|
| 100 |
+
<p>We create a regressor, denoted as <code>$\alpha$</code>, by computing the ratio of gas used to the gas limit. The predicted variable <code>$Y$</code> represents the normalized gas used, determined by the formula:</p>
|
| 101 |
+
|
| 102 |
+
<blockquote>
|
| 103 |
+
<p>
|
| 104 |
+
\[ Y = \frac{{\text{{gasUsed}} - \text{{gasTarget}}}}{{\text{{gasTarget}}}} \]
|
| 105 |
+
</p>
|
| 106 |
+
</blockquote>
|
| 107 |
+
|
| 108 |
+
<p>For varying periods <code>$k$</code>, the regressor variable for the preceding <code>$k$</code> data points is collected into a list, forming the feature set <code>$X$</code>. The variable <code>$Y$</code> corresponds precisely to the prediction variable for the data point at time <code>$t$</code>.</p>
|
| 109 |
+
|
| 110 |
#### Off-chain data
|
| 111 |
Another dataset is users' discussion text from Discord. Discord hosts vibrant crypto discussions ranging from market analysis to technical debates, yet remains underexplored for sentiment analysis, unlike platforms like Twitter and Reddit, where extensive studies in cryptocurrency sentiment research exist \cite{kraaijeveld2020predictive,mohapatra2019kryptooracle,khan2022business}. We focus on critical communities such as Binance, Uniswap, and the Ethereum Dev channels on Discord. These are the communities for the largest centralized exchange, decentralized exchanges, and Ethereum developers, respectively. Analyzing sentiments from these communities, which influence Ethereum's network activity and gas usage through trading dynamics and developer engagement, provides crucial insights for predicting future gas demand and formulating effective network management strategies. The discussion texts are queries from Discord using the DiscordChatExporter, an open-source tool on GitHub.
|
| 112 |
|
| 113 |
+
#### Data processing
|
| 114 |
+
we also incorporate an additional off-chain data source, specifically the discussion text from Discord. To analyze this data, we use a large language model to process English sentences or words, estimating the probability of each sentence being classified as positive, negative, or neutral, ensuring that the total probability sums to 1. After obtaining sentiment information, we organize the corpus sequentially and compute average sentiment scores over both hourly and daily intervals. This sentiment information is denoted as gammma. We then synchronize the on-chain data with the off-chain sentiment using corresponding block data from the previous time chunk, ensuring that only preceding sentiment information is included in the training data.
|
| 115 |
+
|
| 116 |
+
|
| 117 |
### Monotonicity
|
| 118 |
we propose a novel method for predicting gas usage in blockchain transactions, inspired by the concept of pairwise monotonicity as detailed by Chen \cite{chen2023address}. Unlike traditional methods like EMA, which emphasizes the forgetting of older information, our approach employs a monotonicity representation to attribute varying levels of importance to data over time. Monotonicity has demonstrated its interdisciplinary applicability, as evidenced by works such as Liu et al. \cite{liu2020certified} and Milani \cite{milani2016fast}, which focused on individual monotonicity for single variables. Our method is inspired by Chen's work \cite{chen2023address} for introducing pairwise monotonicity in the financial domain. For instance, past due amounts over a longer period in credit scoring should more significantly impact the scoring of new debt risk. Similarly, older data points are less influential in blockchain transactions, whereas recent data points are more critical for prediction.
|
| 119 |
|