# Three paradigms for preserving scaling under state creation repricing What follows is a brief overview of options for preserving scaling under state creation repricing related to [EIP-8037](https://eips.ethereum.org/EIPS/eip-8037). The main [concern](https://ethereum-magicians.org/t/eip-8037-state-creation-gas-cost-increase/25694/10) is that a substantial increase in the state creation gas cost impedes scaling, because more of the available gas is used for state creation in each block. These operations thus crowd out other operations in equilibrium. A deeper analysis is presented by Maria [here](https://ethresear.ch/t/state-growth-scenarios-and-the-impact-of-repricings/23476), and an informal worst-case analysis is available [here](https://ethereum-magicians.org/t/eip-8037-state-creation-gas-cost-increase/25694/13?u=aelowsson). There are two orthogonal pathways to preserve scaling. A. Make adjustments to the protocol to allow for higher state growth. B. Make adjustments to how the protocol processes state creation operations. *This post focuses on (B).* Approaches can be grouped into three paradigms: * *Repricing* – Reprice state creation to shift resource consumption. * *Metering* – Meter state creation to exempt it from the regular block gas limit. * *Targeting* – Meter and target state creation to exempt it from the regular block gas limit and achieve a specific state growth under full utilization. Under all approaches, the harmonization from EIP-8037 should be used. ## Repricing The baseline approach is to reprice state creation operations. Within this approach, there are two paths: * EIP-8037 as is, or with modifications to the `cost_per_state_byte`. This variable is currently set to `1900`, but it may be reduced. * Adjust the `cost_per_state_byte` with the block's `gas_limit`, as originally proposed [here](https://github.com/ethereum/EIPs/pull/10667). This offers a smoother transition when scaling the `gas_limit` and can as a consequence offer modest scaling gains. The exact relationship between the gas limit and the state creation cost can be adapted to the presumed demand elasticity. The approach should be combined with the EIP-8037 harmonization, e.g., as outlined [here](https://ethereum-magicians.org/t/eip-8037-state-creation-gas-cost-increase/25694/8). **Pros:** Simplest solution, particularly the one-time change. The dynamic change is also fairly straightforward. **Cons:** Does not structurally improve scaling because state creation gas will still count against the block's `gas_limit`. Does not target a specific long-run state growth, with a rather broad range of outcomes possible. Relies on estimated demand elasticity instead of observed usage. ## Metering Scaling can be improved by metering state creation and giving it a separate block gas limit, while still using a single base fee. This is the approach of [EIP-8011](https://eips.ethereum.org/EIPS/eip-8011), but with just two resources. One possible specification is discussed [here](https://notes.ethereum.org/@anderselowsson/State_metering). Francesco has an execution spec [here](https://github.com/ethereum/execution-specs/commit/d64f82b18db8c0ae35f3c56e1762ace9d83ba578) for how to meter state creation, written for EIP-8075 (targeting). The same approach can be used when only metering. **Pros:** Facilitates much more scaling by tracking state creation gas separately from regular gas, such that state creation will not crowd out other resources. State creation metering can be reused for more elaborate solutions in the future. **Cons:** Does not fully improve scaling, because the unified pricing can still tilt resource consumption: the single base fee implies that high demand for regular gas raises the cost for state creation, or vice versa, potentially leading to under-utilization. Does not fully target a specific long-run state growth, with a rather broad range of outcomes still possible. Relies on estimated demand elasticity instead of observed usage for pricing. ## Targeting Under a targeting regime, the exact desired state creation is specified, and the protocol adjusts the gas cost to achieve the desired level. Maximum scaling among the outlined options is achieved since the repricing functions like a separate fee. This is the approach presented in [EIP-8075](https://eips.ethereum.org/EIPS/eip-8075). **Pros:** Facilitates the most scaling by tracking state creation gas separately from regular gas, such that state creation will not crowd out other resources, and pricing it separately for full utilization. Targets a specific desirable state growth. State creation metering can be reused for other solutions in the future. **Cons:** Besides adding metering, the approach also adds three header fields (`state_bytes_created`, `state_bytes_cleared`, `excess_state_bytes`). This is the solution that has the highest complexity.