LazyGas is a data-driven tool for optimizing Ethereum gas price recommendations. It analyzes historical transaction data to provide cost-effective gas price suggestions based on desired inclusion times and confidence levels.
- Data-driven recommendations: Uses actual inclusion rates from mempool data
- Confidence levels: Provides gas prices for different confidence levels (50%, 70%, 90%)
- Inclusion time targeting: Optimizes for various inclusion time targets from 12 seconds to 24 hours
- MEV transaction filtering: Removes 0 gas price transactions and special transactions with 0 inclusion delay
Based on our analysis of Ethereum transactions, we recommend the following gas prices:
Inclusion Time | 50% Confidence | 70% Confidence | 90% Confidence |
---|---|---|---|
12 seconds | 1.00 Gwei | 1.00 Gwei | 10.00 Gwei |
30 seconds | 1.00 Gwei | 1.00 Gwei | 1.00 Gwei |
1 minute | 1.00 Gwei | 1.00 Gwei | 1.00 Gwei |
5 minutes | 1.00 Gwei | 1.00 Gwei | 1.00 Gwei |
30 minutes | 0.60 Gwei | 0.60 Gwei | 0.60 Gwei |
1 hour | 0.60 Gwei | 0.60 Gwei | 0.60 Gwei |
6 hours | 0.60 Gwei | 0.60 Gwei | 0.60 Gwei |
24 hours | 0.60 Gwei | 0.60 Gwei | 0.60 Gwei |
Note: For lazy inclusion (> 5 minutes), lower gas prices (0.60 Gwei) are recommended across all confidence levels.
-
Gas Price vs. Inclusion Time: Higher gas prices generally result in faster inclusion, but the relationship is not strictly linear.
-
Inclusion Rate Analysis:
- Transactions with gas prices between 0.5-1.0 Gwei have ~70% inclusion within 12 seconds and ~96% within 5 minutes
- Transactions with gas prices between 1.0-2.0 Gwei have ~81% inclusion within 12 seconds and ~97% within 5 minutes
- Transactions with gas prices above 10.0 Gwei have ~89% inclusion within 12 seconds and ~99% within 5 minutes
-
Special Transactions: A significant number of transactions (~294K) had 0 inclusion delay, suggesting they were special transactions (MEV, flashbots, etc.) that were prioritized regardless of gas price.
.venv/bin/python plot_gas_prices.py
.venv/bin/python test_analysis.py
This analysis uses Ethereum transaction data from February 28, 2025, including:
- Transaction metadata (gas prices, inclusion times, etc.)
- Inclusion delay statistics
- pandas
- numpy
- matplotlib
The gas price recommendation algorithm:
- Filters out 0 gas price transactions and special transactions with 0 inclusion delay
- Analyzes inclusion rates for different gas prices and time windows
- Recommends the lowest gas price that achieves the desired inclusion time with the specified confidence level
- Incorporate time-of-day patterns into recommendations
- Develop real-time recommendation API