---
tags: Bundler-Design
---
# Compression optimization scheme in Bundler CallData Rollup environment (little benefit, temporarily put it)
Do L1 first, L2 compression Gas benefits are not great
The core principle
**is in the Rollup environment, taking ERC20 transfers as an example, compressing the callData of L2Tx will have 6.5% room for gas optimization, but ERC20 transfers under L1 will not have obvious room for gas optimization**
Source of conclusion:[SHORT ABIS FOR CALLDATA OPTIMIZATION](https://ethereum.org/en/developers/tutorials/short-abi/)
## Compress the overall solution
What fields are generally involved in the Tx of a contract interaction?
- Dapp contract address
- Contract function
- Enter params
- User address
### Compression of some common fields
User address address 160Bits, 20Bytes => 32Bits, 4Bytes (supporting 4 billion users, enough to resist Sybil attacks), users need to update this mapping when creating an account
Dapp contract address 160Bits, 20Bytes => 16Bits, 2Bytes (supports 65536 Dapps)
Contract function fucntion 8Bits, 1Bytes (supports 256 functions)
## Data Protocol Design
Use ERC20 transfer as a design example