Arbitrum Blog

The Basics of Adaptive Pricing

Share this article:
The Basics of Adaptive Pricing

Today, pricing on the blockchain is designed to manage demand, recover execution costs, and create revenue for the chain owner. When the blockchain operates near capacity, transaction prices increase, often reflected in gas fees. As gas fees rise, fewer people will submit transactions, which prevents the system from overloading.

Running a blockchain necessitates different compute resources, such as CPU, bandwidth, storage, etc. Each resource has its own congestion capacity, meaning one resource may be congested while another is not.

On the Arbitrum and Ethereum blockchains today, when the price for one resource increases, the price for using all other resources rises simultaneously. This is because the usage of all resources is measured using a single universal gas unit, and the only way to control the price would be to modify the price of this gas unit. To prevent nodes from consuming scarce computational resources, gas limits are set to ensure the most limited resource is only partially used.

In an ideal state, separate fees would exist for different resources, allowing them to operate independently. For example, there could be a specific gas fee for CPU, so only the CPU gas price would increase when its usage rises without affecting other resources like storage and network bandwidth.

This means users would ultimately pay fees based on the congestion status of the different resources. This approach is often referred to as multidimensional pricing. However, due to engineering limitations, it is not yet possible for these various resources to operate independently on the EVM.

There is, though, a form of multidimensional pricing that Arbitrum has already implemented. Execution costs are not the only factor in determining the final price a user is charged when they send a transaction to Arbitrum. Another variable in calculating a transaction cost is the price of posting transaction data onto Ethereum Layer 1. This cost is determined by a separate system, independent of the node's execution, and not based on gas fees.

Although multidimensional pricing is not fully implemented on Arbitrum, it is being actively researched, and the Arbitrum community has developed frameworks that cope better with the single gas unit restriction through a strategy called adaptive pricing. 

What is adaptive pricing?

With adaptive pricing, a single gas unit remains in use, but the pricing differentiates between resources. Unlike a one-size-fits-all gas fee model, the system adjusts prices based on actual resource consumption.

For example, suppose we have two resources: CPU and storage, and each operation is measured using a single gas unit. In this scenario, the CPU can process no more than ten gas units per second, while storage can process up to 20 gas units per second.

Without adaptive pricing, if a transaction required 15 gas units per second and all those units were CPU-related, the system would be unable to differentiate between resources. It would raise the gas price, regardless of whether the 15 units applied to CPU or storage. The gas limit, or target, is set according to the worst-case usage across all resources. Based on our example, this would be ten gas units.

The main idea behind adaptive pricing is to make gas pricing smarter by distinguishing between different resources instead of applying a uniform price for gas usage.

This means the system would recognize whether gas is used for CPU or storage. In the previous example, the price will be raised if the system determines that 15 gas units are being used for the CPU. However, if those 15 gas units are used for storage, the cost would remain unchanged since storage can process up to 20 gas units per second.

At this point in the article, the discussion has primarily focused on average resource consumption per unit of time, normalized to gas units per second. In practice, the usage rate can be measured over a larger time window because the constraint is less sensitive, allowing for temporary deviations from the target rate.  For example, if CPU usage is 15 units in the first second and five units in the second second, then the usage over a two-second window would be 10 units, meaning the price would not change in this scenario. However, if a more sensitive measurement was used, the price may increase after the first second and decrease after the second second. 

The new adaptive pricing system can accommodate both types of measurements.

The key difference here is that while a single gas unit is still used, the system can associate gas with the specific resource it consumes and adjust gas prices based on actual resource usage rather than using the current uniform gas pricing strategy. This will, in turn, promote network sustainability, encouraging an efficient allocation of resources while improving end-user experiences.

Read more