Cointime

Download App
iOS & Android

Bundle Compression

Contract accounts aren’t just better, they’re also cheaper.

Background…

The future of Ethereum is contract accounts on rollups.

Together, contract accounts (also known as “account abstraction”) and rollups represent a fundamental upgrade & enable real-world use of the chain:

  • Fast, cheap transactions.
  • Secure accounts built on best-practice cryptography.
  • Better recovery, including easy-to-use passkey backups. No seed phrase.

EOAs and L1 are settlement infrastructure. The future is 4337 on L2. The problem, so far, was that 4337 on L2 was expensive.

Making 4337-on-L2 efficient

The main cost on L2 is calldata. 4337 can use a lot of that. For example, see Ansgar’s breakdown of what Vitalik later called the “infamous 1600-byte transfer”: a 4337 bundle containing a single Daimo USDC transfer.

We fix this using bundle compression.

The BundleBulker contract is simple and permissionless. Any bundler can register their own IInflator to compress bundles however they want. A good default is the PerOpInflator, which concatenates individually compressed ops. Each bundler (Pimlico, ThirdWeb, Alchemy, etc) can deploy their own PerOpInflator instance, with the beneficiary (op fee recipient) set accordingly. PerOpInflator is similarly permissionless: any app can register their own IOpInflator with arbitrary, app-specific userop compression.

For an example, check out DaimoOpInflator. What it is doing, specifically?

  • Packing. The Solidity ABI encoding was designed for L1, where computation is expensive, not for L2, where computation is effectively free and calldata is expensive. A single boolean argument takes 32 bytes… structs are encoded in a luxuriously expansive way.
  • Templating. Parts of the op that don’t change are templated in. In our case, callGasLimit, verificationGasLimit, and the WebAuthn (passkey) JSON envelope.
  • Stateful compression. We replace the 40 byte (from address, to address) with a ~10 byte (from name, to name) using our existing onchain name registry. We could further optimize by using an index instead of a name.

The important thing is that this setup is permissionless. Any app can write their own inflator and start using it.

Results

Results so far, using a simple ERC20 token transfer as our benchmark.

Bytes per transferJust the op1-op bundle10-op bundle
EOA transaction · example179179179
Naive 4337 · example140816231429
Bundle compression · example127343149

Below: a 4337 bundle containing a single USDC transfer, before and after compression. In both cases, I’ve highlighted the op. The rest is the bundle fixed overhead.

The highlighted op is smaller than an EOA ERC-20 transfer.

Each bundle will contain many of these, amortizing the fixed overhead & making contract wallets more efficient than legacy wallets.

Questions

  • What about rollup compression?

Bundle compression is complementary to rollup compression. Both are useful.

Rollups compress calldata before settling to L1, but this is limited on its own. Stateful compression is hard to achieve. Bundle compression is at the app layer and lets you do application-specific templating and stateful lookups.

Together, this lets us approach the goal state of very compact transactions.

  • Why use 4337 at all, if we’re calling into another contract that sits in front of the EntryPoint?

Three reasons.

  • Standard ops. Userop explorer, ops identified by ophash, everything inter-”op”-erable. If you use bespoke AA, you get no observability or devtools. Note that a userop explorer will show the uncompressed op, —it’ll just have a lower preVerificationGas = lower cost.
  • Censorship resistance. Bundler down or not serving you? Your wallet can send the uncompressed op to the standard 4337 mempool, paying a few cents more fee for guaranteed inclusion.
  • Security. Stick with the battle-tested EntryPoint contract. See below.
  • What if there’s a vulnerability in my inflator?

The inflator contract is, unavoidably, not beautiful to look at. You’re writing a byte-packed encoding, plus templating and lookups.

The great news is that the inflator contract has no security responsibilities. This is because your wallet still signs over the uncompressed op. The EntryPoint contract and your 4337 wallet’s validateUserOp function work exactly as before. If there’s any issue in the inflator contract, it can only cause liveness problems (reverted, invalid ops), not security errors. It’s neatly compartmentalized as an optional optimization.

In fact, this separation of responsibilities makes your wallet more secure. The gross bit-packing goes in one place—the security-critical validation logic goes in another, which can written in entirely idiomatic Solidity.

  • Doesn’t state diff fix this?

State diffs are an elegant theoretical optimization for zkrollups: just prove that you have a block of valid transactions resulting in a given diff. The transactions themselves, and their calldata, are not posted! For a transfer, the diff is just (-10 for alice, +10 for bob). No compression needed.

We’re unlikely to see this in a production, real, stage2 rollup. A state-diff-only permissionless rollup is a scary construct. It raises the spectre of undiagnosable hacks, both of the rollup itself and applications on top. Say a block shows up that drains a defi protocol. You might never learn what the bug was! The transaction was never published, only the final state diff (minus $500m for contract 0x…, plus $500m for bob) and a proof that some valid set of transactions produced this diff. Similarly for proving-system bugs.

TLDR; production rollups will post calldata for the forseeable future.

Comments

All Comments

Recommended for you

  • BlackRock's BUIDL Fund Officially Listed on BNB Chain

     BlackRock's BUIDL fund has officially joined BNB Chain through the technical support of Securitize and Wormhole. The fund's tokenized USD yield product has been approved as collateral on the Binance exchange, providing institutions and traders with a new way to use tokenized government bonds.

  • BTC rebounds and breaks through $97,000

    market shows BTC rebounded and broke through $97,000, currently at $97,007.45, with a 24-hour decline narrowing to 4.48%. The market is highly volatile, please manage your risks accordingly.

  • The three major U.S. stock indexes opened lower.

     U.S. stocks opened lower, Dow Jones down 0.49%, S&P 500 down 1.05%, Nasdaq down 1.45%. Most digital currency concepts and gold mining stocks weakened, Coinbase (COIN.O) down 4.8%, Harmony Gold (HMY.N) down 4.1%. Tech stocks turned green, Tesla (TSLA.O) down 3.78%, Nvidia (NVDA.O) down 2.1%.

  • Applied Digital will raise $2.35 billion through a senior secured note offering.

    Applied Digital, a Nasdaq-listed Bitcoin mining hosting and cloud services company, announced that it will raise $2.35 billion by issuing senior secured notes through its subsidiary APLD ComputeCo LLC. This issuance will be conducted privately and is expected to be completed around November 20, 2025, with the exact timing depending on market and other conditions. The new funds will be used for the construction of its data center campus.

  • Spot gold fell below $4,100 per ounce

    spot gold fell below $4100/ounce, down 1.72% intraday.

  • Ethereum treasury company BitMine appoints new CEO; Tom Lee remains chairman of the board.

    Ethereum treasury company BitMine announced the appointment of Chi Tsang as CEO and member of the company's board of directors, while also appointing three independent directors: Robert Sechan, Olivia Howe, and Jason Edgeworth. The board chairman remains Tom Lee.

  • American Bitcoin released its Q3 financial report: the company's revenue was $64.2 million, and it increased its holdings by approximately 3,000 BTC during the quarter.

    American Bitcoin, a Bitcoin mining company related to the Trump family, released its Q3 2025 financial report, disclosing an increase of about 3,000 BTC during the quarter. As of September 30, 2025, the Bitcoin holdings were approximately 3,418 BTC. In addition, the company's revenue for the quarter was $64.2 million, net profit was $3.5 million, total computing power reached about 25.0 EH/s, and mining capacity increased by about 2.5 times quarter-on-quarter.

  • BTC falls below $96,000

     the market shows BTC fell below $96,000, currently at $95,990.41, with a 24-hour drop of 7.35%. The market is highly volatile, please manage your risk accordingly.

  • BTC breaks through $97,000

     the market shows BTC breaking through $97,000, currently at $97,020.24, with a 24-hour decline of 6.05%. The market is highly volatile, please manage your risk accordingly.

  • ETH falls below $3200

     the market shows ETH falling below $3200, currently at $3199.19, with a 24-hour decline of 7.67%. The market is highly volatile, please manage your risks accordingly.