EIP-8037: State Creation Gas Cost Increase

Thanks, yes I think we can frame it as there being two fundamental models. The gas cost can be (A) set by developers or it can (B) adapt with usage to achieve some specific state growth.

A. The fixed EIP-8037 change and the “dynamic” version that adapts with the block gas limit are fairly similar, with the gas cost set by developers. Adapting the cost with the gas limit offers a smoother transition and scales relative to how much gas is available, but still incorporates some specific gas cost regardless of actual state creation. The outcome can be an increase or decrease in state growth, depending on the price-elasticity of demand and how much the gas limit is scaled. As you mention, the fixed adjustment will have a stronger initial effect in reducing state creation. We could also simply tune the initial effect and the smooth increase to our liking, with whatever curve is preferred.

B. The version that adapts with state creation will see the price adjust until state creation converges at the set desired target. State creation can become very expensive at first relative to the cost of other operations until usage patterns change. A simple pattern is opting to use an existing ETH address instead of creating a new one for each CEX withdrawal, etc. The effect on the gas cost will thus be “as strong as it needs to be”.

We can examine the limits of EIP-8037 by considering the outcome if usage patterns do not change. Of course, as you also illustrate, we can suspect some change in usage. But say for example that the increase in the gas limit is associated with a general drop in the base fee, such that although state creation becomes relatively more expensive than other operations, users do not take notice to the extent that we desire.

Assume we have 30% spent on state gas at 60M gas limit, producing 124 GiB in state growth per year (350 Mib/day). We then scale the L1 by 5x up to a 300M gas limit and increase the gas cost for state creation by 8.5x, while usage patterns do not change. The equilibrium outcome is then that 100 * 0.3 * 8.5 / (0.3 * 8.5 + 0.7) = 78.5% of all gas is spent on state. Even though we scaled the gas limit by 5x, the real achieved scaling is only 5 * (1 - 0.785) / 0.7 = 1.54x, and we would be producing 191 GiB in state growth per year (538 Mib/day).

This was an extreme example that I just wanted to highlight in order to illustrate a general effect that we might see but to a lesser extent. If we end up with a realistic 50% spent on state gas we would see a real scaling of 5 * (1 - 0.5) / 0.7 = 3.57x (focusing here only on non-state operations), producing 122 GiB in state growth per year (343 MiB/day). Note there is a slight discrepancy relative to the state growth specified in EIP-8037 at 300M gas due to the assumption here that 30% spent on state gas at 60M gas limit produces 124 GiB in state growth per year.

Exempting state from the gas limit would produce a guaranteed 7.14x in scaling (for non-state operations). This seems important for a scaling fork. Adapting the price with state creation would produce a guaranteed fixed state growth (at whatever level we specify).