Speed up development and boost team productivity with Virtual TestNets. Get started!

Predicting Blockchain Gas Prices using Machine Learning - Tenderly Internship
Back to Internship Program

Predicting Blockchain Gas Prices using Machine Learning

Overview

This internship project aims to develop a machine learning model for predicting blockchain gas prices, with an initial focus on predicting the next N base fees under the Ethereum network post-EIP-1559. A secondary objective of the project is to develop a model for predicting priority fees, which are additional transaction fees paid to validators to prioritize a transaction. The goal is to build a robust predictive model that can estimate future gas prices and optimize transaction costs for blockchain users.

Duration: 3 months


Milestones

1. Introduction to Ethereum Gas and EIP-1559

1.1. Research the mechanics of Ethereum gas fees after the implementation of EIP-1559.

1.2. Understand the concept of the base and priority fee, gas price dynamics, and factors that influence gas prices (block size, network congestion, transaction volume).

1.3. Review relevant literature. Conduct a review of relevant research papers, articles, and case studies on Ethereum gas fee dynamics and existing models.

2. Initial data collection

2.1. Gather historical data on base fees and other factors. Find existing sources of historical Ethereum transaction data or generate a new dataset.

2.2. Clean and preprocess the data. Handle any missing or inconsistent values. Standardize numerical values, where appropriate, to ensure a fair comparison across features.

2.3. Exploratory data analysis to understand data trends and correlations. For example, plot the base fee against network congestion to find a correlation.

3. Feature engineering

3.1. Select features that could influence gas prices, based on the insights gathered through data exploration. This could include:

a) Network congestion (number of pending transactions)

b) Time of day, week, or month (seasonality)

c) External factors

4. Model selection and training

4.1. Baseline model. Start with a basic machine learning model such as linear regression to predict the next N base fees. This establishes a performance baseline for comparison with more advanced models.

4.2. More advanced models. Implement more complex models, for example LSTMs, which are suited to making predictions based on time-series data. Experiment with different architectures and optimizations.

4.3. Train multiple models. Split the dataset into training and testing subsets.

5. Testing and fine tuning

5.1. Evaluate model performance on the test set by observing error metrics. Look for underfitting or overfitting.

5.2. Hyperparameter tuning to improve model accuracy. Use grid search, random search or more advanced methods to fine-tune hyperparameters.

5.3. Visualize results. Plot predicted vs. actual base gas fees to see how well each model captures the overall trend and variability.

5.4. Feature selection. Revisit your features based on model performance and potentially remove irrelevant ones to reduce model complexity.

6. Report

6.1. A comprehensive report summarizing the project's methodology, key findings, model performance, and insights.


Expected Deliverables

Month 1:

- Cleaned dataset with relevant features

- Initial exploratory analysis

- Baseline model implementation predicting the Ethereum base fee

Month 2:

- Initial advanced machine learning model predicting the Ethereum base fee

- Performance evaluation and model comparison results

Month 3:

- Tuned model with improved prediction accuracy

- Report


Ready to Push Boundaries?

Join us in predicting blockchain gas prices and optimizing transaction costs.

Apply Now