The Good Tech Companies - How to Optimize Ethereum Gas Efficiency With Multidimensional EIP-1559
Episode Date: February 18, 2025This story was originally published on HackerNoon at: https://hackernoon.com/how-to-optimize-ethereum-gas-efficiency-with-multidimensional-eip-1559. Explore how multidim...ensional EIP-1559 updates Ethereum's gas efficiency by separating resource costs, enhancing scalability, and improving network utilization. Check more stories related to web3 at: https://hackernoon.com/c/web3. You can also check exclusive content about #ethereum-blockchain, #ethereum-gas-fees, #ethereum-gas-limit-debate, #ethereum-eip-1559-explained, #ethereum-eip-1559, #2077-research, #ethereum-scalability, #good-company, and more. This story was written by: @2077research. Learn more about this writer by checking @2077research's about page, and for more stories, please visit hackernoon.com. Multidimensional EIP-1559 is a proposed solution to optimize Ethereum's gas efficiency by separating resource costs (computation, storage, bandwidth) instead of bundling them into a single gas unit. This model, inspired by EIP-4844, aims to better utilize Ethereum’s capacity and reduce congestion. By introducing distinct pricing for resources like computation and storage, it allows for more efficient resource allocation and scalability. However, challenges such as complexity, resource interdependencies, and protocol modifications make full implementation difficult. A simpler alternative involves retaining gas as the main unit while differentiating between resource usage, seen in EIP-7623, which offers a step towards multidimensional pricing without full separation.
Transcript
Discussion (0)
This audio is presented by Hacker Noon, where anyone can learn anything about any technology.
How to Optimize Ethereum Gas Efficiency with Multidimensional EIP-1559 by 2077 Research
Explore how Multidimensional EIP-1559 optimizes Ethereum's gas efficiency by separating resource
costs, enhancing scalability, and improving network utilization.
Introduction
Multidimensional EIP-1559 emerged as a research topic after being introduced by Vitalik Buterin
in an ETH research post in January 2022. While it has not received as much attention as other
research topics like roll-ups, MEV, or data availability solutions, it is an active study
area. Research papers recently published by Guillermo Anguirus and Theo Diamandis explore the theoretical
foundations and robustness of multidimensional fee markets and propose how they should be built.
In fact, multidimensional fee markets are already in use today.
With the adoption of EIP-4844 in March 2024, Ethereum introduced blob gas, creating a separate fee market for blob
transactions. This marked a shift from a single-dimensional gas model to a two-dimensional
fee market. However, there is still a need to increase the number of resource dimensions to
optimize transaction resource usage. Expanding multidimensional fee markets is a scalability
solution to Improve Ethereum's
Ability to Manage Diverse Resources More Efficiently. This article explores the importance
and mechanics of multidimensional gas fee markets, explaining how they enhance Ethereum's
scalability and resource allocation. Let's first delve into what exactly multidimensional gas
pricing is. What is multidimensional gas pricing? Multidimensional
gas pricing is an L1 scaling solution, like increasing the gas limit recently implemented
on Ethereum. Although it does not directly increase Ethereum's total transaction capacity,
it maximizes resource utilization within the existing limits. This allows more decentralized
applications, dApps, and users to transact on Ethereum's base layer
without unnecessary congestion. Ethereum currently bundles all resource costs, such as computation,
storage, and bandwidth, into a single gas unit. Multidimensional gas pricing instead separates
these resources, optimizing their allocation while maintaining Ethereum's security and
decentralization. To understand why this is
beneficial, let's consider a real-world analogy. Fitness club as a N analogy Imagine a fitness
club with various facilities, such as treadmills for cardio, squat racks for weight training,
and dumbbells for general use. Members have different preferences, some exclusively use
treadmills, others focus on squat racks, and a few alternate between both.
In a system where the gym charges a flat entrance fee based on the total number of members,
inefficiencies arise. On days when treadmills are overcrowded but squat racks are underused,
the flat fee soars for everyone, forcing weight trainers to pay for the congestion they didn't
cause. Similarly, when squat racks are in high demand,
but treadmills are empty, cardio users bear unnecessary costs.
This single-dimensional pricing ties the gym's capacity to its most congested resource,
creating underutilization of other facilities. This can be regarded as a single-dimensional
pricing model. Now, imagine the gym introducing a multidimensional pricing model. Instead of a
flat fee, it charges separately for treadmills and squat racks. Cardio users and weight trainers are
no longer affected by each other's usage, and the gym can optimize its capacity by managing these
resources independently. With more balanced utilization, the gym can accommodate more
users without increasing overall congestion.
This approach demonstrates the essence of multidimensional pricing,
dividing resources into separate markets to improve fairness and efficiency.
However, too much granularity, such as separate pricing for every piece of equipment,
can introduce unnecessary complexity and make the system harder to use.
This is why, in practice, fitness clubs mostly have a fixed entrance fee price and insist on a single-dimensional pricing model. In the same way that separate fees
for treadmills and squat racks can reduce congestion, Ethereum can use separate markets
for resources, such as computation and data usage. How this applies to Ethereum
Before EIP-4844, Ethereum used a single-dimensional gas pricing
model, where all transaction resources, including computation, storage, and bandwidth,
were bundled into a single metric, gas. This model inherently leads to inefficiencies,
similar to the fitness club analogy. If one resource, such as computation, is heavily used,
fees rise for all users,
even if other resources remain underutilized. If certain resources have excess capacity,
they remain unused due to the rigid gas limit. A key example of this inefficiency is how Rollups
previously stored transaction data. Before EIP-4844, Rollups posted their transaction data
into Ethereum's call data field and paid gas fees based on call data pricing. However, with EIP-4844, Rollups posted their transaction data into Ethereum's call data field and paid gas fees based
on call data pricing. However, with EIP 4844's adoption in March 2024, Rollups now use a separate
unit called Blobgas, which allows them to store data in dedicated structures called blobs.
Although EIP 4844 introduced a second gas dimension, blob gas, for roll-up data,
it remains limited in scope. Blob gas only applies to blob transactions.
Other transaction components, including EVM execution, call data, and storage,
are still priced under a single gas model. Ethereum transactions still consume multiple
independent resources, yet all are priced in gas, leading to inefficient
worst-case scenarios. For instance, suppose a single transaction consumes the entire gas limit,
currently 36M, in EVM execution. Even if Ethereum nodes could safely handle larger data sizes,
the transaction cannot propagate additional data since gas is treated as a single constraint
rather than multiple independent limits. This issue becomes even more evident when looking at Ethereum's block size
distribution. From July 2024 to December 2024, the average block size has been approximately 73
kilobytes, with most blocks well below 100 kilobytes. However, in block number 21419230, the maximum block size reached 1.48 megabytes,
20 times larger than the average. Multidimensional gas pricing addresses this issue by treating each
resource independently. Computation, storage, and bandwidth get separate pricing and limits.
This separation prevents bottlenecks where one resource dominates gas costs and
optimizes capacity without increasing security risks. Vitalik Buterin's articles propose several
key resource types for separation. Let's explore these candidate resources and why separating them
could improve Ethereum's scalability. What resources can be separated through
multidimensional gas pricing? When designing a multidimensional fee
market, resource independence is one of the most critical factors. If two highly interdependent
resources are placid into separate fee markets, it can lead to inefficiencies, mispricing,
and unnecessary complexity. For example, if computation, CPU cycles, and memory usage,
RAM, are priced separately, yet one depends on the other,
users might game the system by shifting costs between themselves, leading to suboptimal pricing.
Thus, before classifying Ethereum resources into separate gas markets, we must first identify which
resources are independent enough to be priced separately without distorting network economics.
At its core, an Ethereum node is a computer
managing multiple resources in parallel. Traditional hardware resources are categorized
into distinct components that can be optimized independently. Computation, CPU, executing
operations like ADD, Multiply, and smart contract execution. Memory I.O., RAM, the reading and writing of temporary data, affecting execution
speed. Storage I.O., SSD, HDD read, write, persistent state access, impacting long-term
storage efficiency. Storage growth, disk space increase, the expansion of stored data, affecting
node sustainability. Bandwidth, network data transfer, the ability to transmit transactions and block
data. The key principle here is parallelizability. If a system can independently process these
resources, separating them for pricing is meaningful. Applying this to Ethereum, we should
aim to classify Ethereum resources in a way that allows Ethereum nodes to operate as efficiently
as possible without unnecessary dependencies. Unlike computers, Ethereum operations do not fit neatly into one category.
Many operations consume multiple resources simultaneously, making it difficult to
separate them. For example, transaction call data primarily consumes bandwidth because it
must be transmitted across the network. It also contributes to storage
growth because it remains in the blockchain permanently. Sloat, storage read, uses storage IO,
but if a node is stateless, it also requires bandwidth to fetch state proofs from a full node.
Storage writes, S-Store, are more expensive than reads because they increase Ethereum's
persistent state, contributing to long-term storage bloat. These interdependencies make separating every single resource into its OWN
pricing market impractical. Instead, we should focus on the most significant bottlenecks directly
impacting Ethereum's scalability. While Ethereum operations involve multiple resources, the
candidates for multidimensional pricing currently discussed are computation,
EVM execution, simple operations like ADD and multiply or pure CPU tasks. Storage I.O.,
S.S.T.O.R.E., slowed, persistent reads and writes that affect Ethereum's state bloat.
Transaction call data primarily uses bandwidth but also contributes to storage. Witness data affects
bandwidth and storage I.O., especially for stateless clients. Backslash dot. By aligning
these categories with how computer systems manage resources, we can make Ethereum's fee structure
more intuitive and efficient. While, in theory, we could subdivide Ethereum resources into even
more granular categories, doing so would increase complexity without proportionate benefits.
Instead, we should focus on the key bottlenecks that limit Ethereum performance today.
For example, transaction call data size directly determines the maximum block size,
making it a crucial bottleneck for Ethereum's consensus layer.
Additionally, storage growth must be controlled to prevent full nodes from
becoming too expensive to run, maintaining decentralization. Thus, rather than introducing
too many dimensions, focusing on a few key resources that dominate Ethereum's efficiency
is practical. With these primary resources identified, we can explore two distinct ways
of realizing multidimensional pricing, separate fee markets or a modified
single gas unit. Implementation of multidimensional gas pricing 1. Separate fee markets for each
resource. One approach to implementing multidimensional gas pricing is to create
independent fee markets for each resource, ensuring more efficient allocation. This method
has already been partially implemented through EIP-4844,
which introduced blob gas as a separate unit for roll-up data storage.
This concept can be extended to other resources, such as state growth or witness size,
allowing Ethereum to manage each resource's limits separately instead of bundling all costs
under a single gas metric. To formalize this approach, let's define buy as the base fee for resource i,
g is the consumption of resource i in a transaction, and ki is the limit for source i
within a single block. The total transaction fee would be computed as i bigi, and a block must
satisfied constraint all txbi ki. For all i for all resources i. Like the current EIP-1559 model, buy is dynamically adjusted based on
previous block usage. Ethereum could adopt exponential pricing models, as used for blob gas,
or another fee update mechanism to regulate resource consumption. The separate fee market
model offers key advantages. It provides precise control over each resource by allowing independent
capping, which helps avoid inefficient worst-case estimations under the current gas model.
It also prevents unnecessary congestion, ensuring that high demand for one resource
does not disproportionately increase fees for unrelated operations.
Additionally, this approach optimizes network usage by enabling direct limits on factors like
data propagation, such as capping it at 1MB or
state growth, rather than relying on indirect gas price adjustments to regulate resource consumption.
While separate fee markets offer improved resource allocation,
subdividing resources too granularly introduces significant complexity.
Creating independent markets for every type of resource would require major protocol modifications,
potentially destabilizing Ethereum's base layer. DApps and wallets would also face additional
challenges, as they would need to track multiple fee markets and predict base fee fluctuations for
each resource, making cost-efficient and timely transaction inclusion more difficult.
Another issue arises when one resource experiences an unpredictable price surge.
Even if a wallet optimizes fees for all other resources, a sudden spike in just-owned fee market could prevent a transaction from being included in a block, leading to uncertainty
and inefficiencies for users. Validators face similar challenges, as their goal is to maximize
earnings while staying within the constraints of each resource limit. As the number of independent
resource markets increases, this situation becomes a complex optimization problem,
resembling a multidimensional knapsack problem where selecting the most profitable transactions
becomes increasingly difficult. Some argue that this complexity may not be a major issue since
maximal extractable value, MEV, earnings contribute significantly to validator profits,
making priority fees less critical in their decision-making. However, the overall feasibility
of implementing fully separate fee markets for each resource remains an open research question,
requiring further exploration of the trade-offs between efficiency, usability, and network
stability. Implementation of multidimensional gas pricing 2. Keeping gas
as the main unit. A simpler alternative to fully separating fee markets is to retain gas as the
primary unit while adjusting how fees are calculated. Instead of introducing new units
for each resource, the total transaction fee is determined by the resource that consumes the most
gas. Let's define the gas cost for resource I as C
and the amount of resource you set as G I. The transaction fee is then determined by sad face
C1 asterisk G1, C2 asterisk G2, C3 asterisk G3. Instead of summing gas usage across resources,
a transaction is charged based only on the most expensive resource it consumes.
For example, consider a transaction that consumes 50,000 gas for EVM execution and 200,000 gas for call data. Under this model, the transaction fee is 200,000 gas since call data is the dominant
resource and the cost of execution IS effectively ignored. While this method simplifies pricing, it introduces potential
problems. Fairness concerns. A transaction that uses 200k gas for call data and 50k for execution
pays the same fee as one that uses 200k gas for call data and 150k for execution. This incentivizes
bundling, where multiple transactions are strategically combined to exploit cost advantages.
As a result, sophisticated optimizers may benefit, making transaction costs less predictable for
regular users and dApps. Resource inefficiency. Since only the highest consuming resource matters,
users may deliberately overuse other resources at no additional cost. In the previous example, EVM execution of up to 150k gas costs no
extra fee, creating wasteful transactions that bloat the network without increasing costs.
Despite these concerns, the primary advantage of this approach is ITS simplicity.
By keeping gas as the universal pricing unit, Ethereum avoids the complexity of managing
multiple resource units while still differentiating
between different types of resource usage. EIP-7623, which will be implemented in the
Pectra upgrade, follows a similar but slightly modified approach. It introduces a dual pricing
mechanism for call data-heavy transactions, ensuring that transactions with disproportionately
high call data usage pay higher fees.
While not a full multidimensional gas pricing model, it represents a step toward better resource differentiation without overhauling Ethereum's gas structure.
How is EIP-7623 related to multidimensional gas pricing?
EIP-7623 introduces higher fees for data availability, DA, transactions, particularly
when call data usage significantly exceeds execution gas usage. This mechanism ensures
that transactions consuming excessive call data pay higher fees, discouraging unnecessary data
storage without requiring new pricing units. A simplified version of EIP-7623's gas calculation is as follows.
Total underscore gas underscore used max, 4 tokens underscore and underscore call data
plus EVM underscore gas underscore use, 10 asterisk tokens underscore and underscore call data,
which simplifies further to, total underscore gas underscore used four tokens underscore and underscore call data plus max
EVM underscore gas underscore used six asterisk tokens underscore and underscore call data.
This formula determines total gas usage by taking the maximum between execution gas and call data
gas. If a transaction primarily uses call data, it will be charged higher fees for call data rather
than being subsidized by lower execution costs. This discourages excessive data storage while ensuring that computation-heavy
transactions are not unfairly penalized. EIP-7623 is a simplified version of multidimensional gas
pricing because it introduces an implicit distinction between execution gas and call
data gas, encouraging a more balanced allocation of
network resources. Conclusion
Although multidimensional gas pricing is often seen as an economic or UI,
UX enhancement, it is a fundamental scalability improvement that enables optimized resource
allocation. However, its implementation faces significant challenges, primarily due to the
substantial protocol layer modifications required and the difficulty of fully separating resource types. As a result, higher-dimensional gas pricing
is unlikely to be adopted shortly. Despite these challenges, multidimensional gas pricing offers
substantial benefits, including improved resource utilization, enhanced network security, and
sustainable node operation. Enabling more efficient use of Ethereum's computational and storage capacity presents
a viable path for Ethereum to scale while preserving decentralization and security.
A version of this article was originally published here.
Thank you for listening to this HackerNoon story, read by Artificial Intelligence.
Visit HackerNoon.com to read, write, learn and publish.