Blobsplaining: The Blob Gas Market Explained

Blocknative Ethereum Web3

Ethereum successfully navigated the Dencun hardfork ushering in the era of blobs. At its core, blobs are a scalability path for the Ethereum network allowing Layer 2s (“L2”), mainly rollups, to post their batch data as blobdata using a new transaction type, called type-3, instead of posting their batch data as calldata as part of a type-2 transaction. Major L2s have quickly adopted this new approach due to its enormous cost-savings (for now!). 

Gas fees on Ethereum mainnet, for rollups at least, just got a whole lot more complicated, so let’s break it down.

We are all familiar with type-2 transactions and EIP-1559. Marketable type-2 transactions split the gas price into two parts, the baseFeePerGas (“base fee”) and the maxPriorityFeePerGas (“priority fee”). Therefore, the total transaction fee can be broken down into the execution base fee (base fee * gas used) and the execution priority fee (priority fee * gas used). 

 

The above example from Ethernow is a breakdown of what that looks like. 

The base fee was ~24.5 gwei, the priority fee was 8 gwei and the gas used was about 124K gas. Therefore:

Execution Base Fee = 24.5 gwei * 124K calldata gas used = ~0.003ETH
Execution Priority Fee = 8 gwei * 124K calldata gas used = ~0.001ETH
Total Fee = 0.003 + 0.001 = 0.004ETH

So, while EIP-1559 added complexity to understanding transaction fees, EIP-4844 makes things even more complicated for L2s looking to use type-3 transactions instead of type-2 transactions.

 

Ok, let’s unpack the above example

A type-3 transaction can contain 1 to 6 blobs with each blob holding 128KiB of data, the “blobspace” or “blob data”. Users decide how many blobs to use, and you pay 131,072 blob gas per blob. So in the above example, this user is using 2 blobs and using nearly 100% of the 256 KiB available. 

Type-3 transactions still pay for any calldata gas used just like type-2 transactions. So a type-3 transaction pays for the calldata gas used PLUS it pays for the blob data gas used, whereas type-2 transactions only pay for the calldata gas used. In the example above, the user is using 240K calldata gas used (not shown in the screenshot) PLUS they are charged 2 * 131,072 blob gas used for a total of 262,144 blob gas used. 

So far, the main users of type-3 transactions are zk-rollups and optimistic rollups. Zk-rollups still use some execution calldata for proofs on their smart contracts + they use the blob data for data availability purposes. The example above is a zk-sync type-3 transaction, which is why it has 240K of calldata gas used. An optimistic rollup does not use any execution calldata gas used, so they only pay for the minimum required gas used in a transaction, 21K gas used (the same as a direct ETH transfer) + they pay for whatever blob gas used on blobs.

The gas price also gets a new addition, the blobBaseFeePerGas (“blob base fee”). 

Type-2 Transactions:

  • Base fee * calldata gas used
  • Priority fee * calldata gas used

Type-3 Transactions:

  • Blob base fee * blob gas used
  • Base fee * calldata gas used
  • Priority fee * calldata gas used

So in addition to the base fee and priority fee from EIP-1559, users also pay the blob base fee multiplied by the blob gas used. In the above example, the user has a base fee of 24 gwei, a priority fee of 1 gwei (these are not shown in the above screenshot), and a blob base fee of 47 gwei. 

Blob Fee = 47 gwei * 262,144 blob gas used = ~0.0124ETH
Execution Base Fee = 24 gwei * 230K calldata gas used = ~0.0056ETH
Execution Priority Fee = 1 gwei * 230K calldata gas used = ~0.0002ETH
Total Fee = 0.0124 + 0.0056 + 0.0002 = ~0.018ETH

But what is this “Total Fee As Calldata” component? Since EIP-4844 is about dramatically reducing transaction fees for L2s, we want to know just how much every type-3 transaction saves a user compared to using a type-2 transaction. To calculate the fee as calldata, we take the contents of the blob data and use the gas used formula for a type-2 transaction (16 gas for every non-zero byte + 4 gas for every zero byte). From there we get the calldataGasUsed (a hypothetical number as if this data were posted as calldata in a type-2 transaction).

Continuing with our above example, the calldata gas used was about 4.2MM. We can then apply the normal type-2 transaction fee calculation to get the Total Fee As Calldata. Therefore:

Execution Base Fee = 24 gwei * 4.2MM calldata gas used = 0.1008ETH
Execution Priority Fee = 1 gwei * 4.2MM calldata gas used = 0.0042ETH
Total Fee As Calldata = 0.1008 + 0.0042 = 0.105ETH

And this fee is 5.8 times more expensive than the actual total fee the user paid for their type-3 transaction!

Another way to think about this is the ‘blob discount’ - the percentage difference in total transaction cost between posting as blob data vs. calldata where percentages > 0% mean blobs are cheaper and percentages < 0% mean calldata is cheaper. In our example above the calculation would be 1 - (0.018 / 0.105) = 83%. For this user, blobs were 83% cheaper than using calldata. 

With our most recent product release, you can use the Ethernow homepage to monitor the aggregate discount for blobs in the most recent block!

 

 

Astute observers will note that early blobs were seeing 100-500 times savings between blobs and calldata, so what happened?

Enter blobscriptions.

On March 27th, degens found a way to test the new hard fork and blobs by creating blobscriptions - inscriptions using blob data instead of calldata. Why would they do this considering blob data is ephemeral and inscriptions are meant to be permanent? 

We aren’t here to judge, just observe 🙂.

In our next post, we will break down all of the trends and dynamics of the emerging blob market, including how blobscriptions flipped the script and changed the game for L2s. 

Stay tuned!

Observe Ethereum

Blocknative's proven & powerful enterprise-grade infrastructure makes it easy for builders and traders to work with mempool data.

Visit ethernow.xyz

Want to keep reading?

Good choice! We have more articles.

ethernow-transaction-explorer-now-supports-the-sepolia-testnet
Ethereum

Ethernow Transaction Explorer Now Supports the Sepolia Testnet

Introducing the Ethernow Sepolia Testnet Transaction Explorer The Ethernow Transaction Explorer has..

blobsplaining-part-2:-lessons-from-the-first-eip-4844-congestion-event
Gas

Blobsplaining Part 2: Lessons From The First EIP-4844 Congestion Event

We recently witnessed the first network congestion event post-Dencun with the blobscription craze,..

announcing-degen-support-in-web3-onboard
Web3 Onboard

Announcing Degen Support in Web3 Onboard

Exciting news for the Degen community! We are thrilled to announce that Web3 Onboard has enabled..

Connect with us. Build with us.

We love to connect with teams who are building with Blocknative. Tell us about your team and what you would like to learn.

"After first building our own infrastructure, we appreciate that mempool management is a difficult, expensive problem to solve at scale. That's why we partner with Blocknative to power the transaction notifications in our next-generation wallet."

Schedule a demo