EIP-4844¶
EIP-4844 ("Proto-Danksharding") is the specific Ethereum improvement proposal that introduced blobs, activated as part of the March 2024 Dencun upgrade. This chapter works through its base fee formula directly, the same exponential-adjustment pattern already covered for ordinary gas in Gas Price and Fees, applied here to blob gas instead.
The blob base fee formula¶
Like EIP-1559's ordinary gas base fee, the blob base fee adjusts automatically based on demand, using an excess_blob_gas tracker: however much blob gas usage has exceeded the per-block target, accumulated over time. The formula is an exponential function of that excess:
// EIP-4844's fake_exponential, computed via Taylor series for
// deterministic, consensus-safe results (no floating point).
function fakeExponential(factor: number, numerator: number, denominator: number): number {
let i = 1;
let output = 0;
let numeratorAccum = factor * denominator;
while (numeratorAccum > 0) {
output += numeratorAccum;
numeratorAccum = Math.floor((numeratorAccum * numerator) / (denominator * i));
i += 1;
}
return Math.floor(output / denominator);
}
const MIN_BASE_FEE_PER_BLOB_GAS = 1;
const BLOB_BASE_FEE_UPDATE_FRACTION = 3_338_477;
const GAS_PER_BLOB = 131_072; // 2^17, matching each blob's 128 KB size
function blobBaseFee(excessBlobGas: number): number {
return fakeExponential(MIN_BASE_FEE_PER_BLOB_GAS, excessBlobGas, BLOB_BASE_FEE_UPDATE_FRACTION);
}
Verified: how fast the fee actually grows under sustained excess demand¶
for (const blobsOverTarget of [0, 50, 100, 200, 300, 400, 500]) {
const excess = blobsOverTarget * GAS_PER_BLOB;
console.log(blobsOverTarget, "blobs sustained excess:", blobBaseFee(excess), "wei per blob gas");
}
// 0: 1 wei
// 50: 7 wei
// 100: 50 wei
// 200: 2,571 wei
// 300: 130,392 wei
// 400: 6,612,064 wei
// 500: 335,290,595 wei
The fee barely moves for the first several dozen blobs of sustained excess demand, then rises extremely sharply. This is the same self-correcting mechanism as ordinary EIP-1559 gas pricing: BLOB_BASE_FEE_UPDATE_FRACTION bounds how fast the fee can change per block (to roughly the same ~12.5% maximum per-block change EIP-1559 uses for ordinary gas), but sustained demand above the target compounds that bounded per-block increase into dramatic growth over many blocks, pushing usage back toward the target the same way ordinary gas base fee does.
Versioned hashes: how execution-layer contracts reference blob data¶
A blob's actual contents aren't directly accessible to EVM execution; a smart contract can't read a blob's bytes the way it reads calldata. Instead, a blob transaction includes a versioned hash (a KZG polynomial commitment to the blob's data, prefixed with a version byte) as part of its ordinary transaction fields, which is accessible to contract execution via the BLOBHASH opcode. This lets a rollup's L1 verifier contract confirm which specific blob's data a batch claims to correspond to, and verify a proof against that commitment, without the contract itself ever needing to process the blob's full 128 KB of raw data directly.
Common misconceptions¶
EIP-4844 did not reduce ordinary Ethereum transaction gas costs. It added a new, separate fee market specifically for blob data; a plain ETH transfer or ordinary contract call's gas cost is unaffected by blob demand, since the two fee markets are independent (see Blobs).
"Proto-Danksharding" is not the final form of Ethereum's data availability scaling. EIP-4844 is explicitly a stepping stone toward full danksharding, which adds data availability sampling and a much higher blob count; the name itself signals this is a deliberately incomplete, earlier phase of a longer roadmap.
Further reading¶
- EIP-4844: Shard Blob Transactions
- EIP-7892: Blob Parameter Only Hardforks
- See also: Blobs, Data Availability, Gas Price and Fees