Try it Live
Run FeeMarket examples in the interactive playground
EIP-4844 Blob Fee Calculations
Exponential blob base fee pricing for data availability.Overview
EIP-4844 introduced blob transactions with separate fee market:- Target: 3 blobs per block (393,216 gas)
- Maximum: 6 blobs per block (786,432 gas)
- Each blob: 131,072 gas (128 KiB)
- Pricing: Exponential based on excess blob gas
- Minimum: 1 wei per blob gas
BlobBaseFee
excessBlobGas- Accumulated excess blob gas from previous blocks
calculateExcessBlobGas
parentExcessBlobGas- Excess blob gas from parentparentBlobGasUsed- Blob gas used in parent
getBlobBaseFee
state- Block state with excessBlobGas
isAboveBlobGasTarget
state- Block state
true if blobGasUsed > TARGET_BLOB_GAS_PER_BLOCK
Example:
Constants
See constants.mdx#eip4844:Blob Fee Dynamics
Fee Growth
Exponential growth when blocks exceed target:Fee Decay
Linear decay when blocks below target:Equilibrium
Constant 3 blob usage maintains stable fees:Fake Exponential
Internal helper implementing Taylor series approximation:factor * e^(numerator / denominator)
Uses Taylor series: 1 + x + x²/2! + x³/3! + ...
Implementation: See BrandedFeeMarket/fakeExponential.js
Properties:
- Converges quickly for normal excess values
- Maximum 256 iterations
- Pure bigint arithmetic (no floating point)
Usage Patterns
Blob Fee Estimation
Blob Count from Gas
Monitoring Blob Utilization
Blob Transaction Fees
See calculations.mdx#calculateBlobTxFee:Implementation
Locations:BrandedFeeMarket/BlobBaseFee.jsBrandedFeeMarket/calculateExcessBlobGas.jsBrandedFeeMarket/fakeExponential.js

