Transaction Fees Optimization in the Ethereum Blockchain

·

Introduction

Ethereum's blockchain relies on transaction fees ("gas") to prioritize and process user transactions. This paper explores methods to determine the minimum gas price a user should pay to ensure their transaction is mined within a specified time frame with a given probability.

Key Concepts


Ethereum Blockchain Mechanics

1. Transaction Processing

2. Gas Mechanism


Challenges in Gas Price Optimization

Users face a trade-off:

Existing Solutions


Proposed Method: Monte-Carlo Simulation

Step 1: Scenario Generation

Generate SC scenarios simulating:

Step 2: Probability Computation

For each scenario sc, compute:

Algorithm Overview

  1. Input: Target time T, probability α, historical data (V, U, W).
  2. Output: Optimal gp_tr.

Experimental Results

Data Collection

Performance Metrics

| Metric | Value (Delay=0ms) | Value (Delay=2500ms) |
|----------------------|-------------------|-----------------------|
| Avg. Precision (α=0.7) | 76% | 71% |
| Computation Time | ≤2s per prediction | |

Key Findings


FAQs

1. How does gas price affect transaction speed?

Higher gas prices increase mining priority. A transaction with gp in the top 10% of the mempool is typically mined within 1–2 blocks.

2. Can I cancel a pending transaction?

Yes, by sending a replacement transaction with the same nonce and higher gp. Success depends on initial gp and mempool congestion.

3. Why do some transactions get stuck?

👉 Learn more about Ethereum gas dynamics


Conclusion

The proposed Monte-Carlo method provides configurable, reliable gas price predictions by:

  1. Simulating future transaction flows.
  2. Accounting for miners’ gas price thresholds.
  3. Optimizing for user-defined time/probability constraints.

Future Work: Integrate real-time mempool data to refine predictions during network congestion.

👉 Explore advanced blockchain analytics