Using Ethereum gas economics to blow up the state size
Devcon 8 · 6 Nov 2026 · 24:57
Jochem Brouwer, who works on the Ethereum Foundation execution layer specs team, examines one very large token contract, the XEN contract, whose minting has created a large share of Ethereum's storage slots. Minting needs many accounts, so factories deploy proxy accounts, and a low base fee makes it profitable. Jochem links this to slower syncing and reviews past gas repricings. EIP-8037 would limit state creation per block, and Jochem says state expiry, state rent and hot and cold storage are ideas, adding that the contract is a legitimate use and the problem is not acute.
Speakers
Topics
From Devcon 8, hosted by Ethereum Foundation.
Transcript
[music] Let's see. Are we going to see the slides? Yes. Cool. Cool. All right. Welcome everyone. Good morning. It's good to see you all here because I am super excited and I hope you are also all super excited. Um today we are going to talk about using Ethereum and gas economics to blow up the state size. Uh this is about one specific contract. Um I'm [snorts] going to talk about this specific one and then I'm also going to give a history afterwards about all the repricings what we have done related to the gas economics of of Ethereum. So this contract it's the Zen contract and it has um well when I checked this Tuesday
17 75.6 6 million storage slots and uh to give like to show like how big this is um this is a factor bigger than the other largest contract and this is by a factor 6.6 so the second contract is USDT and the other one's pyramid 2 but we can see that 6.6 six times this thing is bigger and it's actually very interesting because uh when I saw these numbers I remember that a while ago I checked this and then I think there were like 100 million storage slots or something like that. So I was like really surprised like okay it has it it is still growing. So um also to give like like uh to state like um in the the entire storage sites
of Ethereum this is one in the 10 storage slots of the entire network and also uh one in 20 accounts and more on that later because why are other accounts related to to this so first about the contract what can it's a way you can it's an EC20 token and you can mint this token and how you do this is there are two actions what you do. You do an claim rank with one argument. This is the amount of days what you have to wait uh in order to claim your mint reward. And after the after you wait these days, then you claim the reward. And uh this has some some payment logic like an rank delta.
This is related to the amount of mints whatever happened. And amplifier this is the amount of days since the contact was created. This is being decreased. But more importantly, it's the term. Every mint creates six storage slots. And every address can only mint uh start to mint once. So these six slots like what do they do? Because it's really interesting like these slots are like not optimized at all. So there are six slots. The first slot is the the user. This uh the second slot well index one it's the terms or the amount of days you have to wait. The second is some time stamp. The third is uh the rank and amplifier which I think do not even have to be saved but well maybe there's an reason for this. Um,
and this could actually all be compressed in one slot, but for some reason this did not happen. So the idea is that there's only like one address and per address you can only start one mint. So what is actually happening like the reason why people are still minting this token is because there is like a market demand for it because there people are for some reason buying this uh this token. Um and and uh so if you want to mint more tokens, you will need more accounts. So what do we see in the economy or well what what people optimize for is we want to create multiple accounts and then we want to mint with one transaction multiple tokens. So what we see is we uh um there are mint factories which create like
proxy accounts and uh these in one transaction start to batch mint these tokens. So these are some numbers from uh last Tuesday. Uh there were about 1,800 transactions and in these 1,800 transactions there were 128 calls to the exam contract. Uh and you can see there were like 19 93,000 claim ranks um which started to initialize this process and there were actually 30,000 claims. So it's it's somewhat falling behind.
Um also what we are seeing is that multiple proxies were deployed. It's like 56,000 of these uh these new proxies. So there are also people like these proxies are going to reuse that proxy to remint tokens. But these new uh proxies mean that either new people or u um well more accounts are being created to mint mint these tokens. And what we are also seeing is that uh on that day there was 10.3 billion gas being used to um to execute this contract. So that is 4.7% of the amount of gas that was used on mainet that day.
And in this this batching what happens is u we have like an EIP 7825 uh gas limit which is about 16.7 million. >> [snorts] >> Five 15.7 million gas has been used per transaction and this mass mass mints these uh these tokens and you can also see that there were 1 million sour calls in this uh on this day which was 1 in nine stors on that day and oh yeah but you can also see that um well 82% of the amount of creates so account contacts being created was uh done by these uh by these factories.
So if you check the Zen contract and if you see like where does this this gas actually go we see that uh on that day there were there was 8.75 billion gas being used to claim rank and 1.54 um uh used to mint uh mint mint these these tokens and I want to also to state that uh if you create a new proxy what happens is you then only do the claim rank to initialize this minting process but then if you actually mint it then you will actually reinit these mints. Uh so we can see this is about like this 56,000 box accounts which are actually also being being created.
So [snorts] the question is why is this still happening and this has to do with the token price and also with the um the gas the base fee what you have to pay in order to to run these transactions. So if the base fee is below this line um then it is actually profitable to mint these tokens. And you can see that if you start uh if you have a fresh proxy for a new account the base has to be lower because you need to pay more gas to uh create this proxy and to start this minting process and it also has to do with like this rank. So you can see that in uh if you only wait for one day then you get less tokens. So the base fee has to be much lower than uh if you wait for a longer time. But of course
this is a kind of risk because if you wait um if the token price changes or if the base fee um uh raises uh above this level then it is not profitable anymore. What's also really interesting is you might might think like okay but what if I will just wait by actually minting these tokens I will just wait until my uh until the base fee is low enough that they can actually directly sell these tokens in order to to profit. The thing is that this contract also has like an maturity. So if you wait uh like one day then you get 1% less tokens, two days 3% and you can see after 7 days you get almost nothing. So what we also see is there are a lot of abandoned uh mints because if you would mint it you would pay more to actually uh you would pay
more in gas than you would get if you would sell these these tokens. So why does this keep growing? So this is about like the base fee and you can see that uh this is really related to both the base fee and of course the token price and uh well if we raise the gas limit then uh the base fee usually drops and we can also directly see that this directly correlates with more mints mints happening and we can see that this is still growing. What we can also see is that the amount of slots being created and the amount of slots being cleared. Um this is about the uh so the difference is also about like the abandoned slots.
So if you uh create a new proxy then you are starting to create more more of these storage slots. Um and actually clearing the storage slots is also abandoning your mint. So how does this work? Like in the in these economics like if the gas limit goes up then the base fee will go down then the amount of profits that you can get will go up that means that we will get more proxies and it also means that the state growth is going up and some nums on like what is actually this this footprint on on mainet. So 10.4% of all the storage slots on mainet are related to this contract. These proxy accounts are 5.2% to 2% of all the accounts and in well in the last nine
days the new store were at 30 33% uh 23% new accounts for these new proxies uh the amount of create two op code executions in the past 9 days sorry on on Tuesday um was 82% 30% of all the store gas uh 8.9% of the actual esto executions and 4.7% of all the gas being executed that day um Yeah. So what happens in all these box because this is like one well I don't say a bottleneck but things what we have improved over time um by benchmarking and also to um um to give like an like an like an idea like the storage size of
this contact it's very big and we use a Mer Patricia tree which is related to it's an hexary tree. So this tree has like 16 branches on every uh every node. So that means if we have like 16 times more storage then this contract ad depth gets one level deeper and that means that on average you will need to have one more hashing operation by every storage. So what you do so this diagram shows like what happens in like uh if if you would like mint uh multiple tokens you are going to change your storage slots. So over this entire tree you are going to change multiple nodes and all these nodes you have to hash them in order to get the storage route of this of this contract.
What's also interesting is the syncing um demand uh demand or or um what happens in the syncing process of a node. So if you launch a note, what you need to do currently, well always is you have to download the entire storage in order to execute new uh code and uh some clients, not all clients, they use snapsync and what you do there is you start to repress uh range ranges of the of the Merkel tree and uh this itself works up to some extent because you have a pivot block and um of course during your syncing the chain still adds new blocks. So the storage tree actually actually changes. So if you have this
pivot block then there are some new blocks and the storage tree still changes and you also need to have a way to sync like these changed nodes and you can imagine like this contact it is like we have just seen like the the amount of execution happening uh on this on on onen. So there are a lot of nodes changing and this means this is the healing part of the of the snapsync that means you have to heal like a lot of nodes. So this is like extra um uh extra logic that you have to do in order to to sync your note. And this is also like one of the reasons that it might look that you've you've almost st the entire chain but it seems to be stuck at like 99%. Because this is the healing phase and this is like the like the thing what
this what's hard but what is really nice in glamdom we are adding block access list and this has the nice side effect that this directly um uh adds away in the network protocol in order to directly download the changing nodes. So now we don't have this healing phase anymore and now we can directly uh update these nodes while they're actually being changed and this was not possible before the block access list and this is about EIP 8189 which is a snap to uh protocol in order to sync sync the notes and I will also want to state like I think this is really nice because this is actually a polite uh state bump because in [snorts] some cases it actually uh cleans up and what they also
see is that proxies are being reused and of course of course could have been worse because we uh the contract would also force for instance that uh an account could only mint tokens once. Um and of course we could also like like make this layout bigger like we could use more storage slots um uh um per per minute. [snorts] But I also want to state that itself is not the problem. So what we really value is is crops. So censorship resistance, open source privacy and security and ken is actually it's a very legitimate use of the protocol. So we are not going to like I do not want to imply that we are going to ban kenno or something like that. It's just that
sense shows that like this problem it's growing like every day. It's not like an acute problem but it is something what we well we have we have to think about like how we are going to to to tackle this problem. And now I will go um into the history part of like how did we uh tackle these state problems before. So let's go back to the start of the chain. Um maybe some of you people know like the the gas cost of some op codes. Um in 2015 when we started like if you create a new storage slot you paid 20,000 gas. That's currently still the still the case. If you would change um a storage slot, you would pay 5,000 contract. And if you clear one, you would actually get 15,000
gas in in refund. Self-destructs, which were actually an up code, but you could actually lose back then. You could actually destroy contracts even after they were being created, um gave you a 24,000 refunds. Uh new accounts costed 25,000 gas and a cod coded deposit cost 200 gas per bite. And that is like really nice. The SO cost was only 50 back then. Balance and X code size 20 and call 40. And we will go into like how these were increased later. So in 2016 we had an DOS attack. They were called the Shanghai attacks because these attacks they had uh they had like bites into this call data which said from Shanghai with love. So it was well
actually very accused attack I would say. Uh [snorts] and if you would re-execute these blocks, you will also see that you these blocks are still really slow to execute because the dos factor here was like you would uh you would either like load a lot of accounts uh or you would create a lot of accounts and there were like many variants of these uh these uh these attacks. And how was this safe? These were like some kind of emergency. Well, not really emergency but somewhat uh well actually it was very clear that something had to be uh um uh be done because nodes were really slow. So we had EMP 150 this repriced these uh these up codes by a lot. So X code size to 700 uh balance to 400 150 to 200. No you can see you can see the
numbers. Selfie was not uh not being free anymore. And EP161 was about cleaning up uh basically garbage state. So in the past what you could do is you create could create empty accounts into the the Merkel tree which had no balance no nons no nothing but they were actually in the balance tree. So you had to store like if an account is not there or if an account is empty. So that's basically like a waste of space and EIP161 cleaned up these these accounts. In 2019, we realized again that uh that we had to do something about state because the state keeps growing. So you have more hash operations and you need to do something about this. So we had to repric and what happened then is EIP1283 was proposed. This was also going to
repric state operations. And two weeks before this fork happened, uh we got a security report that there was actually a smart contract um uh re-entry problem. And uh this was so this fork is called Constantinople, but officially it's actually called Petersburg because the way how we handled it back then is what we had like the Constantinople fork and at the same block we had an an extra fork with which was called Petersburg um which actually removed this EIP. So it was a way to to deal on the development side with this uh this uh this thing [snorts] and this state problem was actually solved in a later fork in the Istanbul fork es to from 200 to 800 gas balance from 400 to 700 gas exot from 400 to 700 and this were also
was actually also the first EIP which said okay this state growth is a problem and this is the reason why we actually repric these thing in 2021 we uh introduced the concept of cold and warm accounts So this has to do with reading a stories and reading accounts. So if you read an account for the first time in a transaction, then you have to pay an extra cost in order to load this account. Uh which is which was or is uh 2100 for an uh for a storage slot and 2,600 for for an account.
And the reason for this is that um uh this is to limit the amount of of storage slots or accounts what you are going to read. The problem is that if you introduce this, so you are raising the gas cost of these storage slots and these accounts if you uh if you um uh uh read them for the first time is that some smart contracts back then uh broke because gas is being made like okay this call will cost like at most this amount of gas uh and then this call would actually these calls would actually go out of gas if we would not do anything about this. So the way how this was fixed was to introduce access list in a transaction by EIP 2930 and this was to to save this uh this problem. Okay, I have to to speed up a little bit I see.
Um so but we also saw that uh there were gas tokens being created and this was a way to uh at low gas prices you would buy storage slots and then when the gas uh prices were getting higher then you could actually clear the storage slots to get a refund in order to um to basically to get a discount on your gas price and this created like an artificial demand for for storage and for accounts on the network. And the way how this was solved was to uh create EIP 3529 and this was to cut the maximum refund amount to uh to 20% instead of the 50%.
So what are we actively doing now to solve this problem? We are creating uh a way to actually limit the amount of state that is being created per block. And this is uh this is done by each time if you create a new storage slot earner account you have to to pay for this um per bite you are going to pay 50 uh 1,530 gets and this is to to order or to bounce the amount of state what can be created per block. Okay let's go to the next one. So this state problem it's not it it is not like a super acute problem but it it is really something what we have to solve and there are some proposals we are going to move to or we might move to
part partial binary trees um and this solves in some to some extent the storage uh data structure itself but what we what we really need to do is we have to think about like how are we actually going to to price this uh this state. So we can think of like state expiry, state rent or all other things. And this is where any of you can come in like if you have a great idea like how we should do this then um please open an EIP print that EIP and then we can uh we can move on. All right, thanks everyone. All right, that was a great session on storage. We have quite a bunch of questions. Uh maybe uh we do the one with the most votes so far. So if
Ethereum states keeps growing because of contracts like SEN, how will this affect ordinary node operators who don't have expensive hardware? Hm. Okay. Um it depends like how you would define expensive hardware like I think no I don't think like what is happen going to happen in Amsterdam is we are uh so introducing like EPA 8037 and this really bounce the amount of state growth what what we can have. So you can basically reason like okay if we would have the maximum amount of state creation happening then you can reason like okay I now need this disk size and that means in like this time I would need like a bigger disk. So I think at
this point uh if you like have like sufficient room left on your disc then it's not nothing really to be afraid of at this point but it really is like a problem what we have to solve in the future because the states will keep growing and yeah we have to we have to solve this. Yes. >> Okay. Next up uh what can Ethereum realistically do about contracts that have already created the huge amount of state? Can that data ever be safely removed? >> [snorts] >> It depends of course like what you mean by by safely removing. I don't think that we can remove any data. I mean it is like how would we reason what data can we actually remove. I think we can't um we we can do that. We cannot say this data is is right data and this data is
this wrong data. So we can do that but there are proposals like uh for instance like this uh this contract. It also has like a lot of abandonments. So these are storage slots which were created like like years ago. they have not been touched like uh like in recent recent time and we could think for instance about like okay this could be like cold storage and we could think about like hot storage. So hot storage could be like let's say like storage what what was being created or read or whatever in like the past week and anything that's older than that if you would like to to read this or like to to to change this then you would have to pay an extra fee u because then the nice property of this is that uh depending of course on how you would price this is that you can
then move this cold data to like a slow disk and you can move the hot data to like a a faster disk. So we could for instance uh buy like a very disc um a slow disc um at at like low cost and then like use a faster disc like a current SSD to to uh to host the hot state. >> All right, next question. Uh do you have projections on how extendments uh would behave in Glamsterdam with EIP 80037 increasing gas price for store and create?
>> Yes. So um if you would assume that uh there there are two things what is going to happen. So we are going to increase the gas limits in Glamdam from 60 to 200. So what will likely be the result of that is that the base fee is going to to be lower. So if the gas price will then uh sorry if the if the AT37 will then not happen that would mean that uh uh there um the base fee will go lower. So will be more demand to create like these uh these extend tokens. Uh but the thing is we are going to replace this thing. So uh about like new proxies being created this will be much more expensive. So likely that means that the amount of proxies uh what we currently have and the amount of minting what's
what's currently happening that will uh stay like this uh but at least the state growth like no new proxies will be created because this will not be profitable anymore. >> Thank you for that. I think we can do one more question. Um let's see any up votes any any >> let's see I I can answer this to do something let's see >> okay maybe the second one if someone is willing to pay enough gas to store large amounts of data on Ethereum should the network allow it or should there be any limits on how much data contract can create
Mhm. I I I I guess it depends like um like one of these proposals what we also have is like we are going to price the uh the storage slot based on like how big your contract contract is. So for instance if you get like a very big contract then at some point you could have to pay like a factor more in gas cost to um to to to to create like this this storage. So what would happen then is that we would create like an economic incentive to sort of move source to like um um smaller uh smaller contexts and I think that's something what we really should should explore. Yeah.
>> [music]
Related talks
- Sina Mahmoodi - Stateless Ethereum
- From 30M to 300M: The Engineering Behind Ethereum’s Gas Limit Leap
- Marius van der Wijden - Sustainable Scaling
- Devconnect recap, All things ZK and much more - The Daily Gwei Refuel #850 - Ethereum Updates
- Core dev updates, ETFs and DATs buying ETH & more - The Daily Gwei Refuel #853 - Ethereum Updates
- Nethermind roadmap and Ethereum benchmarking - Marek Moraczyński & Kamil Chodoła - Nethermind
- Milos Stankovic - Understanding Glamsterdam
- Glamsterdam Ethereum Hardfork: Deep Dive
- Wait, It's All Resource Pricing?
