Home

Awesome

Quick setup and test

After cloning locally, run forge install and npm install to install dependencies. Be sure to already have circom installed.

To quickly run tests:

Each of the implementation's test inherit a base test Zyclone.t.sol which holds all the tests. The individual test files for each implementation only updates the zyclone instance to be used for testing.

Zyclone 🌀

Zyclone is a Mixer similar to Tornado Cash but with some extra modifications to its approach in order to achieve the significant gas savings listed below. In comparison it is 500% cheaper than Tornado cash to use.

General Benchmarks

VersionCreation code sizeCreation gas costRuntime code size
Tornado Cash5,438 bytes3,449,4164128 bytes
Zyclone Huff impl1,932 bytes400,0821888 bytes

Runtime (Function call) benchmarks

VersionDepositWithdraw
Tornado Cash1088354301233
Zyclone Huff impl229016249780

Differences

Huff Code Methodology and Setup

This codebase was implemented from ground up starting with a solidity version, then an intermediate representation using inline assembly for complex functions before implementing in huff. This also means there's a solidity and yul reference for quick scanning of the codebase.

Each relevant external function is heavily documented with a well defined calldata layout.

The code also follows the pattern of 1 opcode per line and stack comments for easier readability

In the huff folder, it is separated into 6 files

Circuits ⚡️

Team 🐴