-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Nest.jsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendNew feature or requestNew feature or request
Description
📌 Overview
Accurately forecasting gas prices allows developers and automated systems to plan transactions, reduce costs, and avoid overpayment. Current real-time estimation is reactive, lacking forward-looking insight.
This task introduces a Predictive Gas Model using historical gas data and regression-based techniques to forecast gas prices for the next 1–3 hours.
🎯 Objective
Build a predictive analytics module that:
- Leverages historical gas datasets
- Implements regression or ML-based prediction models
- Generates short-term gas price forecasts (1–3 hours ahead)
- Provides structured predictions for integration with wallets, dApps, and automated strategies
🛠 Scope of Work
1️⃣ Historical Gas Data Preparation
- Aggregate historical gas metrics:
- Base fee (EIP-1559)
- Priority fee
- Gas used per block
- Network congestion indicators
- Normalize and clean datasets:
- Handle missing data
- Convert timestamps to consistent intervals (1-min, 5-min)
- Store in time-series database for training and evaluation
2️⃣ Predictive Model Implementation
- Choose modeling approach:
- Linear regression / polynomial regression
- ARIMA / SARIMA (time-series)
- Optional: Lightweight ML model (XGBoost, LSTM)
- Features may include:
- Base fee trends
- Priority fee trends
- Mempool congestion metrics
- Block interval variance
- Train model on historical dataset
- Validate using:
- Mean Absolute Error (MAE)
- Root Mean Square Error (RMSE)
3️⃣ Forecast Generation
- Predict gas prices for 1, 2, 3 hours ahead
- Include prediction confidence intervals
- Support multiple chains (EVM-compatible)
- Output structured prediction format:
{
"chainId": 1,
"predictions": [
{ "time": "2026-02-18T10:00:00Z", "predictedBaseFee": "38 gwei", "confidence": 0.9 },
{ "time": "2026-02-18T11:00:00Z", "predictedBaseFee": "42 gwei", "confidence": 0.85 },
{ "time": "2026-02-18T12:00:00Z", "predictedBaseFee": "41 gwei", "confidence": 0.88 }
]
}
API Exposure
GET /analytics/predictive-gas?chain=<chainId>&hours=<1-3>
ML / Prediction
Python (optional) with scikit-learn / statsmodels
TensorFlow.js (optional, for JS-based prediction)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Nest.jsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendNew feature or requestNew feature or request