Optimal Dynamic Fees for Blockchain Resources

Davide Crapis, Ciamac C. Moallemi, Shouqiao Wang

TL;DR

This paper introduces a formal mathematical framework for designing optimal dynamic fee mechanisms for blockchain resources. By applying linear-quadratic control theory and Kalman filtering, the authors develop "LINDY" policies that outperform current heuristics like EIP-1559, offering more stable prices and more accurate resource allocation, especially when dealing with multiple interdependent resources like "gas" and "blobs."

What Problem Does This Paper Address?

Public blockchains like Ethereum use transaction fees to manage limited computational resources. Historically, all resources (CPU, storage, etc.) were bundled into a single unit called "gas." However, the ecosystem is moving toward multi-dimensional fee markets (e.g., EIP-4844), where different resources like data availability ("blobs") are priced separately.

The current industry standard, EIP-1559, uses a heuristic update rule: if a block is more than half full, the price goes up; if it's less, the price goes down. While effective for one resource, this approach has two major flaws:

  1. Lack of Foresight: It uses only the most recent block's demand as a "naive" estimate for the future, leading to over-correction and price volatility.
  2. Resource Interdependence: It ignores "cross-effects." For example, if a transaction requires both Gas and Blobs, a price hike in one should logically affect the demand for the other. Current protocols update these prices independently, which can lead to inefficient "cycles" of price correction.

Methods

The authors treat blockchain pricing as a stochastic control problem. Their framework, which they call LINDY, relies on several key techniques:

  • State-Space Modeling: They model aggregate demand as a mean-reverting process with Gaussian noise. This captures the reality that demand spikes are often temporary but have some "memory."
  • Kalman Filtering: Instead of looking only at the last block, the protocol uses a Kalman filter to maintain a "belief" about the underlying hidden demand state, filtering out local noise to make more robust price adjustments.
  • Linear-Quadratic Control: They define an objective function that trades off two goals: (1) keeping resource usage near a sustainable target and (2) minimizing price volatility (regularization).
  • Model Predictive Control (MPC): To handle the fact that price sensitivity itself changes over time, they use MPC to repeatedly solve for the optimal price path based on current estimates.
  • Eigenresources: For multi-dimensional markets, they introduce a novel decomposition method. By identifying "eigenresources" (linear combinations of resources that don't interact), they show how complex multi-variable pricing can be simplified into independent, parallel update rules.

Datasets

The authors evaluated their model using real-world market data from the Ethereum blockchain:

  • Scope: Approximately 100,000 blocks over a 14-day period (starting February 24, 2023).
  • Parameters: They used the Expectation-Maximization (EM) algorithm with a Kalman smoother to estimate the "ground truth" demand and price sensitivity parameters from this historical data.
  • Benchmarks: They compared their LINDY(0) and LINDY($\lambda$) policies directly against the live EIP-1559 mechanism.

Key Insights and Ideas

  • The "Aim Price": The optimal price isn't just a reaction to the last block; it's a weighted average of future "market-clearing" prices. This "aim price" helps the controller set prices that work well not just for the next block, but for the sequence of blocks to follow.
  • Responsiveness vs. Robustness: The framework mathematically defines the optimal balance. If the "noise" in block demand is high relative to the "persistence" of demand shifts, the controller should be less responsive to avoid erratic price swings.
  • Bundling Strategy: The "Eigenresource" result suggests that protocol designers should bundle resources that have high cross-sensitivity into a single virtual resource, or unbundle them such that the resulting units have minimal demand-side interaction. This makes the pricing logic simpler and more efficient.
  • EIP-1559 is a Special Case: The authors show that EIP-1559 is essentially a simplified version of their model that uses a fixed "learning rate" (1/8) and a naive demand estimate.

Key Results

Using the Ethereum dataset, the authors found that their LINDY policies significantly outperformed EIP-1559:

  • Reduced Bias: LINDY policies were much more accurate at hitting the 15M gas target. EIP-1559 overshot the target by 1% on average, while LINDY(0) reduced this bias by 99.9%.
  • Lower Congestion: LINDY resulted in 62% fewer "near-full" blocks (blocks >95% capacity) compared to EIP-1559. This suggests a much smoother user experience during high-demand periods.
  • Smoother Prices: The regularized policy, LINDY($\lambda$), achieved a 28% improvement in price stability (measured by Root Mean Squared Update) while remaining more accurate than the current heuristic.
  • Superior Spike Handling: Qualitative analysis showed that LINDY reacts more aggressively to genuine demand spikes (surging fees quickly to protect the network) but settles back to baseline faster than EIP-1559 once the spike ends.

Limitations and Future Work

  • Computational Constraints: Implementing a full Kalman filter and matrix inversions at Layer 1 (L1) is resource-intensive. The authors acknowledge that their results might be better suited for Layer 2 (L2) solutions or used to "tune" simpler heuristics for L1.
  • Strategic Behavior: The model assumes aggregate demand follows a specific stochastic process. It does not explicitly model game-theoretic "fee manipulation attacks" where a single large actor tries to trick the filter.
  • Multi-Dimensional Data: While the theory covers multiple resources, the empirical section only tests the uni-dimensional (Gas) case because multi-dimensional data (from EIP-4844) was not yet available at the time of the study. The authors plan to extend the empirical analysis to two dimensions as "blob" data becomes available.

Summary updated

BibTeX
@inproceedings{crapis2024optimal,
  author = {Davide Crapis and Ciamac C. Moallemi and Shouqiao Wang},
  title = {{Optimal Dynamic Fees for Blockchain Resources}},
  booktitle = {FC},
  year = {2024},
  doi = {10.1007/978-3-031-78676-1\_15},
}
Figure