Maat: Analyzing and Optimizing Overcharge on Blockchain Storage

Zheyuan He, Zihao Li, Ao Qiao, Jingwei Li, Feng Luo, Sen Yang, Gelei Deng, Shuwei Song, Xiaosong Zhang, Ting Chen, Xiapu LuoFAST 2025 · OpenReview

TL;DR

Blockchain transaction fees can be significantly higher than the actual cost of storage operations, leading to "overcharge" issues. This paper introduces Maat, a novel tool that analyzes and optimizes these overcharges by employing fine-grained data collection, consensus-aware optimizations, and resource pre-allocation. Maat effectively reduces transaction fees by up to 32% on Ethereum and 31% on Binance Smart Chain, with minimal performance overhead, making blockchain storage more affordable and efficient.

What Problem Does This Paper Address?

Blockchains, like Ethereum, use transaction fee mechanisms (TFMs) to allocate the costs of on-chain resources such as storage, computation, and bandwidth. However, the current TFMs often don't accurately reflect the actual resource consumption, particularly for storage operations. This discrepancy leads to users paying more in transaction fees than the services they actually consume, a phenomenon the authors term "overcharge." This issue affects a significant portion of transactions and contributes to a substantial amount of wasted fees, hindering the broader adoption and usability of blockchain technology. The paper identifies three specific overcharging issues: continuous access to the same object within a block, continuous access across a limited number of blocks, and the deployment of duplicate contracts.

Methods

Maat tackles overcharge issues through three core techniques:

  • Fine-grained Data Collection: Instead of relying on coarse-grained opcode-level gas costs, Maat collects detailed information on gas fees at the storage operation level. This allows for precise tracking of resource usage and identification of where overcharges occur. It focuses on high-level semantics like account and slot access, rather than all storage components, for efficiency.
  • Consensus-Oriented Optimizations: Maat ensures that its fee optimizations are consistent across all blockchain nodes by analyzing high-level storage semantics. This approach aligns with the blockchain's consensus mechanism, preventing discrepancies in charges and maintaining network integrity.
  • Resource Pre-allocation: To ensure storage operations are consistent across different blockchain clients and heterogeneous nodes, Maat preemptively specifies and allocates necessary resources (e.g., memory). This technique helps maintain deterministic behavior for cache accesses, regardless of client implementation or hardware.

Datasets

The paper evaluates Maat on real-world blockchain data from Ethereum and Binance Smart Chain (BSC).

  • Ethereum: Data from block #18M to #19M (approximately 1 million blocks), containing 1.58 x 10^8 transactions, 4.34 x 10^9 related opcodes, and 5.86 x 10^9 storage operations.
  • Binance Smart Chain (BSC): Data from block #34.15M to #35.15M (approximately 1 million blocks), containing 1.68 x 10^8 transactions, 1.33 x 10^10 related opcodes, and 1.73 x 10^10 storage operations.

The authors also mention porting Maat to 50 other popular blockchains, suggesting a broad applicability beyond the primary datasets.

Key Insights and Ideas

  • Overcharge is Pervasive: The paper's analysis reveals that overcharging issues affect a significant majority of transactions (over 70%) and contribute to a substantial portion of transaction fees (around 40%) on major blockchains like Ethereum and BSC. This highlights the widespread impact and economic significance of the problem.
  • Fine-grained Analysis is Crucial: Traditional TFM analysis at the opcode level is insufficient. Maat's success hinges on its ability to drill down to individual storage operations, revealing inefficiencies that would otherwise be masked.
  • Consensus is Key for Trust: By aligning optimizations with blockchain consensus, Maat ensures that its fee adjustments are universally accepted, preventing forks or inconsistencies across nodes.
  • Scalability Across Blockchains: The fact that Maat can be seamlessly deployed across 50 blockchains with minimal code changes underscores the universality of the overcharge problem and the effectiveness of Maat's approach.

Key Results

  • Ethereum: Maat reduces transaction fees by 32%, saving approximately $5.6 million USD weekly. This performance is nearly three times better than the baseline (EIP-2929).
  • Binance Smart Chain (BSC): Maat achieves a 31% reduction in transaction fees, saving about $1.54 million USD weekly.
  • Performance Overhead: Maat introduces a minimal performance overhead of 1.4% in block processing time and a 5.6% increase in memory consumption, demonstrating its practical feasibility.
  • Optimization Rule Effectiveness: Combinations of optimization rules show varied but significant improvements, with the full set of rules (COMB16) achieving the maximum 33% fee reduction.

Limitations and Future Work

  • Non-Blockchain Storage: Maat currently does not consider non-blockchain storage components (e.g., OS page cache) as they don't follow consensus, making it difficult to ensure consistency.
  • Unaddressed Overcharge Issues: There might be other overcharge issues not covered by Maat's current optimization rules, particularly those related to MPT and bytecode interactions between cache and disk.
  • O3 Scope Tradeoff: The current scope of O3 optimization (128 recent blocks) balances optimization efficacy with resource usage. Future work could explore finding a better balance for increased optimization.
  • Client Termination: Client termination can lead to cache data loss, potentially causing inconsistent gas costs. Maat addresses this with a write-ahead log (WAL) for cache consistency, though it introduces some overhead.
  • Miner/Validator Income: While Maat reduces transaction fees, it also impacts miner/validator income. The paper argues this is a necessary trade-off for broader blockchain adoption and that other income sources (like block rewards) and increased user activity will compensate.

Summary updated

BibTeX
@inproceedings{he2025maat,
  author = {Zheyuan He and Zihao Li and Ao Qiao and Jingwei Li and Feng Luo and Sen Yang and Gelei Deng and Shuwei Song and Xiaosong Zhang and Ting Chen and Xiapu Luo},
  title = {{Maat: Analyzing and Optimizing Overcharge on Blockchain Storage}},
  booktitle = {FAST},
  year = {2025},
  url = {https://openreview.net/forum?id=iZhHCATl6C},
}
Figure