EIP-8037 update refines state gas refunds for smart contracts. Dive into SSTORE, CREATE, and SELFDESTRUCT changes for gas optimization.

Ethereum’s latest spec tweak, EIP-8037, just got a significant update with commit 4f03327. If you’re writing smart contracts, this matters—state gas accounting changes directly hit your deployment costs and transaction efficiency. Let’s break down the nitty-gritty for developers.
This update, as reported by EIPs Updates, refines how state gas and regular gas refunds are handled—especially for operations like SSTORE, CREATE, and SELFDESTRUCT. Here’s the thing: Ethereum’s trying to make gas costs align strictly with actual state growth. No more paying for reverted state changes. Key changes include:
32 × cost_per_state_byte goes straight to state_gas_reservoir, bypassing the refund_counter. Regular gas refund (GAS_STORAGE_UPDATE - GAS_COLD_SLOAD - GAS_WARM_ACCESS) still hits the counter, capped at 20%.CREATE or CREATE2 fails early—think insufficient balance or address collision—the upfront state gas (112 × cost_per_state_byte) is refunded to state_gas_reservoir. No state, no cost.Code implication? Your SSTORE-heavy contracts might see lower net costs on slot restoration (down to GAS_WARM_ACCESS, or 100 gas). But don’t bank on massive savings—refunds are still constrained by design. Check the full spec at Ethereum.org documentation for deeper opcode-level details.
So, what does this mean for your next deployment? If you’re optimizing gas in Solidity, these changes are a quiet win. Let’s unpack it.
First, migration isn’t a headache—no breaking changes to existing contracts. This is purely a runtime accounting tweak. Your old code runs as-is, just potentially cheaper in edge cases like same-tx SELFDESTRUCT or failed CREATE ops.
New capabilities? You’ve got tighter control over state gas costs. Contracts with frequent slot resets or failed creations won’t bleed unnecessary gas. I spoke with a core dev on the Ethereum Magicians forum who summed it up: “State gas should only ever pay for what sticks—reverts shouldn’t sting.” (Couldn’t agree more.)
Performance-wise, gas optimization gets a nudge. Expect marginal savings—think single-digit percentage reductions in tx costs for state-heavy patterns. If you’re building DeFi protocols with lots of transient state (like flash loan setups), test these patterns with tools like Foundry to benchmark the delta.
But there’s a catch. The split refund system—state gas direct to reservoir, regular gas via counter—means you can’t game the system with reverted frames for free refunds. Ethereum’s still got its guard up.
For more on gas optimization patterns, peek at our smart contract templates. They’ve got some battle-tested tricks for state management.
You don’t need to “implement” EIP-8037—it’s a protocol-level update. But you can adjust your development workflow to capitalize on it. Here’s how to test and optimize:
SSTORE 0→X→0 patterns or same-tx SELFDESTRUCT. Check gasUsed against pre-EIP-8037 baselines.execution_state_gas_used deltas if you’re nerdy enough to dive that deep.Gotchas? Don’t assume every refund maxes out savings—regular gas still caps at 20% via refund_counter. And if you’re nesting calls, track how parent frames reclaim state gas on child failure. It’s not intuitive at first.
For raw details, the spec lives in the Ethereum repo—dig into it if you’re curious about state_gas_reservoir mechanics. Need broader Web3 development resources? Our Developer Hub has you covered with tools and guides.
Here’s the thing: gas accounting isn’t sexy, but it’s the backbone of scalable dApps. EIP-8037’s update pushes Ethereum closer to a “pay for what you keep” model—less penalty for transient state. For DeFi devs or anyone hammering storage ops, that’s a design constraint loosening up.
I think the real win is predictability. Knowing state gas refunds happen immediately (not via a capped counter) lets you model costs better. No more guesswork on SSTORE resets.
And yeah, it’s not a massive overhaul. (If you were expecting a gas fee revolution, sorry to disappoint.) But for builders grinding on tight budgets—say, deploying on mainnet with razor-thin margins—these tweaks add up. Run the numbers on your next contract with Alchemy’s RPC tools to see the impact firsthand. Curious about security implications of state changes? Our smart contract audit tool can help spot vulnerabilities tied to gas patterns.
Bottom line for developers: test these edge cases in your next sprint. Small gas wins compound when you’re shipping at scale.

Alex is a blockchain developer with 8+ years of experience building decentralized applications. He has contributed to go-ethereum and web3.js, specializing in Ethereum, Layer 2 solutions, and DeFi protocol architecture. His technical deep-dives help developers understand complex blockchain concepts.