EIP-3529 Gas Refund Changes and GasToken Death
EIP-3529 changed Ethereum gas refunds by removing SELFDESTRUCT refunds, cutting storage clearing refunds from 15,000 to 4,800 gas, and capping refunds at one-fifth of gas used.

On this page
Ethereum once paid users gas refunds for deleting data from its storage. That design created an unexpected market: tokenized gas itself. EIP-3529 changed the refund rules so sharply that the economic model behind GasToken collapsed, while leaving smaller, targeted refunds for patterns such as anti-reentrancy locks and ERC-20 approvals. This article explains how the refund mechanism worked before the change, what EIP-3529 altered, and why the distinction matters for anyone reading Ethereum transaction costs.
What gas refunds were meant to do
On Ethereum, every transaction consumes gas, and users pay for that gas up front. If a transaction uses less gas than the limit the user set, the unused portion is returned. Separately, certain storage operations could add to a refund counter. The idea was to reward developers for “good state hygiene”: clearing storage slots or contracts no longer needed, thereby limiting the growth of Ethereum’s shared state.
Before EIP-3529, the Ethereum specification described three refund cases for storage writes. The most consequential for this story applied when a storage slot originally held a nonzero value and was changed to zero. In that case, the protocol added a fixed amount—15,000 gas under EIP-2200—to the refund counter. A second case applied when a slot moved from zero to nonzero and then back to zero; it added roughly 19,900 gas to the refund counter. A third case applied when a slot changed from one nonzero value to another and then back to the original value; it added roughly 4,900 gas.
Refunds were applied only after a transaction finished executing. They could not increase the gas available to any individual call while the transaction was still running. Instead, they reduced the final amount of gas the user paid for, effectively returning part of the prepaid gas.
This design had a side effect the EIP authors later described as unexpected: refunds gave rise to GasToken.
How GasToken used the refund mechanism
GasToken was not a conventional token representing an asset or a share in a project. It was a mechanism for storing gas itself. The basic idea was to buy gas when network fees were low, “bank” it by writing data into Ethereum storage, and later reclaim the gas by clearing that storage when fees were high. Because clearing a storage slot generated a refund, the user could receive more gas back than the clearing operation itself cost, under the old rules.
The critical refund case was the first one: changing a storage slot from nonzero to zero added 15,000 gas to the refund counter. Under the old rules, the clearing refund could exceed the gas spent touching and clearing a previously populated slot in the later transaction. The resulting reduction in the transaction’s net gas charge could make room for later transactions in that block. It did not increase the gas available inside the currently executing call.
EIP-3529’s rationale explains why this mattered at the network level. Of the three refund cases, only the first—clearing a slot that originally held a nonzero value—enabled gas tokens and allowed a block to expend more gas on execution than the block gas limit appeared to allow. The other two cases were paired with earlier expenditures on the same storage slot, so they could not be used to extract gas from one slot and spend it on another.
GasToken also had network downsides. By using state slots as a “battery” to save up gas, it exacerbated state size growth. It could inefficiently clog blockchain gas usage and increase block size variance. Under the old refund cap, refunds were limited to half of a transaction’s gas used, meaning the theoretical maximum actual gas consumed in a block could approach nearly twice the on-paper gas limit. That was not fatal, but it was undesirable, particularly because refunds could sustain elevated usage spikes longer than Ethereum’s fee market could easily absorb.
What EIP-3529 changed
EIP-3529, authored by Vitalik Buterin and Martin Swende, took effect for blocks at or after a fork block determined by network consensus. It made three central changes.
First, it removed the gas refund for SELFDESTRUCT entirely. Previously, destroying a contract could generate a refund. After the change, no such refund existed.
Second, it replaced the fixed SSTORE_CLEARS_SCHEDULE value of 15,000 gas with the sum of SSTORE_RESET_GAS and ACCESS_LIST_STORAGE_KEY_COST, which the specification describes as 4,800 gas as of EIP-2929 plus EIP-2930. This was not an arbitrary reduction. The EIP’s pairing argument showed that for the total gas expended on a storage slot to be guaranteed positive, the refund for clearing it had to be no greater than the minimum cost of reading and editing that slot for the first time. Setting the clearing refund to 4,800 gas met that condition.
Third, it reduced the maximum gas refunded after a transaction from gas_used // 2 to gas_used // 5. The EIP names the old constant 2 as MAX_REFUND_QUOTIENT and changes its value to 5. This meant refunds could cover at most one-fifth of the gas a transaction used, rather than one-half.
| Mechanism | Before EIP-3529 | After EIP-3529 | Effect |
|---|---|---|---|
| SELFDESTRUCT refund | Available | Removed | Contract destruction no longer yields a gas refund |
| Clearing nonzero storage to zero | 15,000 gas refund | 4,800 gas refund | GasToken-style arbitrage no longer profitable by design |
| Maximum refund share | gas_used // 2 | gas_used // 5 | Refunds capped at 20% of gas used instead of 50% |
| Zero-to-nonzero-to-zero pattern | ~19,900 gas refund | Preserved | Anti-reentrancy locks and approve-and-send keep favorable treatment |
A hypothetical worked scenario
The following scenario is illustrative and uses simplified assumptions. It is not a record of an actual transaction, and the gas figures are drawn from the EIP’s described parameters rather than from a live block.
Compare two explicitly hypothetical transactions. In transaction A, a slot is already nonzero when execution begins and is then cleared. Its original-nonzero clearing refund changes from 15,000 to 4,800 gas under the EIP. In transaction B, a slot starts at zero, is set to nonzero, and is restored to zero before that same transaction ends. This is a different case: the specification preserves its approximately 19,900-gas refund-counter adjustment. Applying the 4,800 figure to transaction B would confuse the two cases.
Counter adjustments are not automatically the rebate actually received. For example, assume a hypothetical transaction consumes 100,000 gas before refunds and accumulates a refund counter of 30,000 gas. Under the one-fifth cap, only 20,000 gas can be refunded, leaving a net charge of 80,000 gas. This isolates the cap calculation; it is not a benchmark or a profitability model, and it omits any comparison of token prices or fee periods.
The EIP also offers a probability-based intuition for ordinary users. Suppose someone holds one unit of an ERC-20 token and is giving away or selling their entire balance. They could leave a tiny remainder in the storage slot instead of clearing it entirely, hoping to re-acquire tokens later with the same address. Under the old rules, the 15,000 gas clearing refund meant it only made sense to leave the remainder if the user was more than about 87.7% likely to use the slot again. Under EIP-3529, the remaining 4,800 gas refund means the break-even probability falls to about 28.1%. This is an inference from the EIP’s stated figures, not a guarantee about user behavior.
Why SELFDESTRUCT refunds were removed
The EIP removed the SELFDESTRUCT refund because refunds for contract destruction were part of the same broad refund system that enabled gas tokens and increased block-size variance. Removing it did not break the ability of any code to execute, because refunds are applied only after transaction execution and cannot affect gas available during execution. However, it rendered some applications that depended on the refund economically nonviable.
The EIP authors state plainly that gas tokens would become valueless under the new parameters. That is a specification-level conclusion about economic viability under the changed rules, not a claim about any specific token’s market price or trading status.
What refunds remain and why
EIP-3529 did not eliminate all storage refunds. It preserved favorable treatment for two patterns the authors highlight.
The first is the zero-to-nonzero-to-zero pattern. If a storage slot starts at zero, is set to nonzero, and is later returned to zero, the refund is roughly 19,900 gas. Because obtaining that refund required spending 20,000 gas earlier on the same slot, the mechanism cannot be used to extract gas from one slot and spend it on another. The net cost remains positive.
The second is the nonzero-to-different-nonzero-to-original pattern, which preserves a roughly 4,900 gas refund. This refund is available only when 5,000 gas had previously been spent on the same storage slot, so it is similarly paired with an earlier expenditure.
The EIP identifies two practical examples of the preserved pattern: anti-reentrancy locks, typically flipped from 0 to 1 before a child call and back to 0 when the call ends, and ERC-20 approve-and-send flows, where an approved value moves from zero to nonzero when a transfer is approved and back to zero when the transfer processes. These patterns continue to cost only about 100 gas in effective terms under the described assumptions.
The remaining 4,800 gas refund for clearing nonzero storage to zero means there is still some incentive to clear storage, but it is much narrower. The EIP frames this as preserving an incentive for “useful” data that has been read, while removing the net refund for “useless” data that has not been read.
Limitations and what the change does not mean
EIP-3529 changed Ethereum’s refund parameters as described in the specification. It did not make refunds into cash payouts. A refund reduces the gas a user ultimately pays for a transaction; it is not a separate token balance or a withdrawable amount.
The change did not make all storage clearing uneconomic. It reduced the refund from 15,000 gas to 4,800 gas and capped total refunds at one-fifth of gas used. Some clearing operations may still be worthwhile depending on the application’s storage layout and the user’s expectation of reusing a slot.
The specification does not state a historical activation date for mainnet; it describes behavior for blocks at or after a fork block marked TBD in the source text. Readers should not infer a deployment date from the specification alone.
The EIP’s statement that gas tokens would become valueless refers to the refund-based economic model described in the document. It does not by itself establish what happened to any particular project’s token price, adoption, or smart-contract code after the fork.
Finally, the removal of refunds does not mean contracts stopped executing. Refunds were invisible to transaction execution, so removing them did not break on-chain logic. It changed the economics of certain patterns, not the ability of the EVM to run them.
- Check whether a contract relies on SELFDESTRUCT refunds; those refunds no longer exist.
- Distinguish storage-clearing refunds from ordinary unused-gas refunds; both are applied after execution.
- Remember that the maximum refund is now gas_used divided by 5, not divided by 2.
- Treat preserved zero-to-nonzero-to-zero patterns as still incentivized, but verify the specific storage costs for the contract in question.
- Do not interpret “gas tokens become valueless” as a claim about any individual token’s market value without separate evidence.
EIP-3529 changed Ethereum’s gas refund system by removing the SELFDESTRUCT refund, cutting the storage-clearing refund from 15,000 gas to 4,800 gas, and capping total refunds at one-fifth of gas used instead of one-half. The changes were designed to make gas-token arbitrage nonviable while preserving smaller refunds for storage patterns such as anti-reentrancy locks and ERC-20 approvals. Refunds remain a post-execution adjustment to gas costs, not cash payouts, and the specification does not by itself establish what happened to any particular project after the change.
Source context: Reduction in gas refunds.


Discussion