From DefiLlama
Jump to navigation Jump to search

Swap, earn, and build on the first optimistic rollup optimized decentralized crypto trading protocol.

What it does

Zipswap is a more gas efficient, optimistic rollup native swap. Based on a modified UniswapV2 codebase, the goal of ZipSwap is to provide users with lowest fee possible on optimistic rollups.

Technical explanation

  • All modifications were designed to reduce the byte size of users' transactions by compressing needed data. Optimistic rollups scale ethereum by putting entire transactions on-chain, but not executing them except in the case of fraud, making size the most important fee determining factor. As of now, each non-zero byte costs 16 gas, while a zero costs 4. At 150 gwei and $4300 ETH, that means each non-zero byte costs about $0.01.
  • ZipSwap used 2 bytes: 1 non-zero and 1 zero, for the total cost of 20 gas. Default UniswapV2 call used 260 bytes: 51 non-zero and 209 zero, for the total cost of 1652 gas. Therefore, in this case the argument part itself is cheaper 82.6x times.
  • Real fee savings are smaller - as transactions also include signatures, origin address, nonce and other standard fields. There's also an additional fee overhead that depends on a particular rollup implementation and negligible computation fee. At the end, the total fee for a standard swap is $2.34, while fee for the ZipSwap version is $1.65, a difference of 29.5%. This scales with the current ethereum gas price, and increases for more complex swaps.
  • At the same gas price, fee for a direct ETH transfer was $1.69 - which is more than the swap fee. ZipSwap achieved maximum gas efficiency possible on optimistic rollups.

Future Features

Stablecoin pools

  • Low slippage and low fee pool type suitable for swaps of stablecoins and other mutually pegged tokens.

Guaranteed liquidity pool

  • It will provide buy-side liquidity and a guaranteed price minimum without the need for a paired liquidity token. Protocol-owned ZIP-ETH pool will be moved to this type, once available. All protocol-owned unsold ZIP tokens in the liquidity pair are going to be burned.

Potential additions

  • Liquidity ranges, known from UniswapV3. Due to complexity, feasibility to be determined after adding two previous pool types.
  • In order for these upgrades to be possible without requiring liquidity migration, the main router contract will be placed on a 7 day timelock. Once done, the upgrade possibility can be disabled forever.