Skip to content
forked from daimo-eth/bulk

Make compressed 4337 bundles swole again

Notifications You must be signed in to change notification settings

mouseless0x/bulk

 
 

Repository files navigation

Bulk

Make compressed 4337 bundles swole again.

Bulk makes 4337 on L2 cheaper. Bundlers can pass compressed bundles to BundleBulker, which decompresses them before calling the 4337 EntryPoint contract. This reduces L1 data usage, the dominant cost of rollup transactions.

For example, here's a single USDC transfer executed as as a one-op bundle.

Before: 1.6kb

After: 353b

Details

Decompression happens via arbitrary contracts that implement IInflator. This lets bundlers or individual applications can define their own templates or decompression algorithms. Inflators can be stateful for greater savings.

A bundler supports compression as follows:

  • client submits compressed op
  • bundler inflates, validates as usual
  • bundler submits compressed

Compression is independent from the security of the contract account being called. The same userops go to the EntryPoint either way, validation and execution identical--this is just an optimization to use less calldata.

Bulk is intended for use directly by bundlers, eg with API keys--so griefing can be mitigated offchain. The userop mempool remains important for censorship resistance, and apps can continue to submit uncompressed ops to mempool as a fallback if a direct bundler API is unavailable.

Quick start

Proof of concept. In active development.

git clone [email protected]:daimo-eth/bulk --recurse-submodules
foundryup
forge test

About

Make compressed 4337 bundles swole again

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 64.4%
  • TypeScript 34.4%
  • Shell 1.2%