A fork of tornado.cash using Optimism's L2 optimistic roll-up
This project uses the Optimistic OVM to build a fork of tornado.cash on an optimistic rollup. Using tornado.cash's open source contracts, we imported them into the OVM and ran the optimistic compiler. Unfortunately, one of tornado cash's contracts uses circomlib's mimc_gencontract.js script, which generates a raw EVM-bytecode encoded contract from scratch in javascript / web3-utils. Since we didn't have a similar script for OVM-bytecoded encodings, we were unable to get the compiled MiMCSponge contract into the OVM and thus compile the entirety of tornado.cash in the OVM.
We brought tornado cash's open-sourced contracts (https://github.com/tornadocash/tornado-core) into the Optimism OVM (https://optimism.io/) to attempt an L2 privacy-preserving zk-SNARK-based transaction mixer. Tornado cash uses a zk-SNARK to preserve the privacy of the set of withdrawers from the contract, and thus mixes its withdrawal transaction with the whole depositer set. An L2 implementation on Optimism would have had the added benefits of merkle-root-update-based transactions using Fraud Proofs to settle onto L1.