![WAX - The Impact of Blobs on Compression](https://hackmd.io/_uploads/SJHMJzSR6.png) ***tl;dr** - The economic pressure for compression has temporarily disappeared. This situation might persist for years. This is a good thing, and provides space for more standardization and improvement before efforts need to focus on implementation. Compression still has a huge role to play in a future that brings enough demand to require it.* Blobs have changed compression economics far more than I expected. I did always say that we simply won't know how much blob data will cost until it arrives. That was true, but I also figured that the 100x reduction I'd heard was probably a bit optimistic, and hoped only for 10-20x. What reduction factor are we seeing instead? **400,000,000,000x** # WUT 🤯 I totally understand if that seems impossible, and there are important caveats. But it's also kinda true. Let me explain. In the early days of Ethereum, it was sometimes possible to get your transaction included without paying any fees at all[^1]. That's a reduction factor of *infinity*, and what's happening now with blobs is similar. The key is that the price mechanism is based on competition for space in a fixed capacity set by the network. Since [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559), if a block uses less gas than a fixed target, the network fee is lowered by 12.5% (at most), and raised if the block is over the target, with a hard limit of 2x the target[^2]. This means that if the blocks are consistently under capacity, the gas price will exponentially decline until it reaches its minimum possible value of 1 wei (=10^-18 ETH). This is what's currently happening for blobs - we're under capacity. Blobs are priced differently than all other Ethereum ops. You may be familiar with differing amounts of gas consumption for various things, but blobs are not like that. They don't use gas, they use *blob gas*. The price of blob gas is set independently, using the same type of pricing mechanism. So even though Ethereum gas has remained in the 10-100 gwei ballpark, blob gas is sitting at 1 wei. It will only meaningfully increase when there is a sustained demand for more than 3 blobs per block (384KiB). Since blobs consume 1 blob gas for each byte, L2s now pay 1 wei per byte. Prior to the Dencun upgrade, it was 16 gas per byte, with gas running at about 26 gwei. That's about 400 gwei (0.1 cents). 1 wei is 400 billion times smaller (0.00000000000025 cents). # Caveats Now, that doesn't mean L2 fees have reduced by 400 billion, so here are the caveats: - You still need to pay the fee charged directly by the L2 - This still means a huge reduction of 10-300x, depending on the L2 - When posting blobs you still need to pay the minimum 21,000 gas on L1, so if you spread that over the maximum of 6 blobs that a single tx can carry, that's still about 0.027 gas per byte, which is a 600x reduction - L2s generally have additional L1 processing to do for each batch, costing additional L1 gas # When Will Blobs Cost Money? And How Much? What am I? A fortuneteller? Ok... well, here's a log chart of L2 tps (transactions per second) from [L2 beat](https://l2beat.com/scaling/activity) over the last year: ![Screen Shot 2024-03-18 at 17.19.17](https://hackmd.io/_uploads/Hys60Lr0a.png) (Make sure to check that rollups-only box.) This is a growth rate of about 62%[^3]. Here's a chart of daily blob gas usage from [blobscan](https://blobscan.com/): ![Screen Shot 2024-03-18 at 17.37.45](https://hackmd.io/_uploads/BkuubvSRp.png) Ignoring the frenzy of what happened immediately following the upgrade ([including humorous things](https://twitter.com/Rjected/status/1767928246614499812)), using the 16th March value seems a better estimate of current demand. That's 880 million blob gas in a day. The capacity is 2.83 billion[^4]. This puts us at 31% capacity. At a growth rate of 62%, we'd reach 100% capacity in about 2 years. **BUT WAIT**: 3 blobs/block is just the conservative initial capacity that's been allocated. From the [EIP](https://eips.ethereum.org/EIPS/eip-4844): > The values for TARGET_BLOB_GAS_PER_BLOCK and MAX_BLOB_GAS_PER_BLOCK are chosen to correspond to a target of 3 blobs (0.375 MB) and maximum of 6 blobs (0.75 MB) per block. These small initial limits are intended to minimize the strain on the network created by this EIP and are expected to be increased in future upgrades as the network demonstrates reliability under larger blocks. We can't know how far proto-danksharding can be pushed, but going by the earlier target of 8 blobs/block for this EIP, we wouldn't hit that capacity for 3.5 years. We can't assume it will take that long of course, and certainly it's hoped that the 10-300x cheaper fees will accelerate growth (see [The Surge](https://ethereum.org/en/roadmap/)). In any case, I believe we can expect the L1 costs of L2 networks to remain virtually zero for some time. When capacity is reached however, the cost of blobs might appear very quickly. As for cost, I would expect the L1 fee to cause overall fees to double or more in a pretty short period when they appear. The reason is that L2 traffic appears to be relatively insensitive to fees, and we can therefore expect it will take a large increase in fees to convince participants to reduce their activity. This fee insensitivity makes sense because of how cheap L2s are. I mean sure, it's awesome to nerd out about how you can send money around for 0.1c, but if you care about a transaction, does it really make a difference to you whether it's 10c or 0.1c? I think this explains why the short-term increase in L2 traffic has only been about 30%. New traffic sources that *require* these near-zero fees, like social media and gaming, might change this. Time will tell. # What's the Outlook for Compression? We won't see any economic pressure for compression for some time, but it will return. Additionally, in the long term, compression is still vital for scalability. Currently blobs provide for 0.375MiB of space in each block. Predictions are hard, but it's expected the network can handle 1MiB of blobs in each block using the current tech. The core network can make this upgrade by simply tweaking the parameter. Since Ethereum runs at 12s/block, that's 83KiB each second, enough for 420 ERC20 transfers (ie 420 tps). That would be awesome, but still caps Ethereum traffic significantly below Visa's 1,700 tps. Compression can bridge this gap. An ERC20 transfer can be encoded in under 20 bytes, providing for 4,200+ tps. **That's an impact worth working on**. Full danksharding is also coming (although years away), and is expected to deliver another 8x scaling factor. This would exceed even Visa's claimed capacity of 24,000 tps. # What Now? Since the economic pressure for compression has disappeared but only temporarily, the space would benefit more from standardization efforts and improved primitives, and less from integrating current approaches. I look forward to a time when compression plays a critical role in Ethereum scaling, but let's celebrate the success of proto-danksharding for now. [^1]: I actually wasn't able to locate a concrete example of this. I have heard it is true and it should have been possible in my understanding. If you can locate a concrete example, please let me know. [^2]: You can still manually specify the fee you're willing to pay, but if you pay more than this, you're just over-paying, and if you pay less, validators have no reason to include your transaction. [^3]: Note that this is +85% each full year due to compounding. In one day, the trendline would show about 62%/365 increase, but compounding this gets you +85% in a full year. [^4]: 3 blobs per block, each blob is 2^17 blob gas, 86400/12 blocks per day. 2.83b ~= 3`*`2^17`*`86400`/`12