project screenshot 1
project screenshot 2
project screenshot 3

op-kompressor

Decompress calldata at runtime to save L1 gas while transacting on L2s like Optimism where gas is an expensive resource.

op-kompressor

Created At

ETHGlobal Lisbon

Winner of

trophy

🏆 ETHGlobal Lisbon Finalist

Project Description

This project uses a modification of the run length encoding scheme to decompress Ethereum calldata at runtime in order to save gas while transacting on L2s like Optimism where calldata is an expensive resource.

In contrast with L1, adding a single byte of calldata to your transaction costs the equivalent of storing ~1kb of data in storage on L2. In contrast, runtime computation on Optimism is cheap. In order to combat this, I took inspiration from Ori's Short ABI post (https://ethereum.org/en/developers/tutorials/short-abi/) to create the op-kompressor, a contract that allows for relaying compressed calldata.

How it's Made

This project uses a modification of the run length encoding scheme to decompress Ethereum calldata at runtime in order to save gas while transacting on L2s like Optimism where calldata is an expensive resource.

In contrast with L1, adding a single byte of calldata to your transaction costs the equivalent of storing ~1kb of data in storage on L2. In contrast, runtime computation on Optimism is cheap. In order to combat this, I took inspiration from Ori's Short ABI post (https://ethereum.org/en/developers/tutorials/short-abi/) to create the op-kompressor, a contract that allows for relaying compressed calldata.

It is built using foundry, differential tested with a reference Rust implementation of the ZeroKompression scheme, and optimized for runtime efficiency.

background image mobile

Join the mailing list

Get the latest news and updates