tornado-nova/README.md

52 lines
1.8 KiB
Markdown
Raw Normal View History

2021-06-16 02:31:31 +02:00
# Tornado Pool [![Build Status](https://github.com/tornadocash/tornado-pool/workflows/build/badge.svg)](https://github.com/tornadocash/tornado-pool/actions)
2021-10-26 11:40:56 +02:00
This an experimental version of tornado.cash that allows to deposit **arbitrary amounts** and make **internal(shielded) transfers**.
2021-10-26 11:36:30 +02:00
Other facts about this version:
1. It uses L2 (xdai). Xdai has a ETH(mainnet)<>WETH(xdai) bridge that will be used under hood.
2. Contracts will be upgradable by tornado-cash governance! xdai bridge supports transferring messages from L1 to L2 and vise versa, so community can always upgrade tornado-pool to a new version in case of an issue.
3. Since it's a beta version, deposits are limited by 1ETH. Governance can always increase the limit.
4. Withdrawal amount from pool to L1 has to be larger than 0.05 ETH to prevent spam attack on the bridge.
5. The code was [audited](./resources/Zeropool-Tornado.pool-audit.pdf) by Igor Gulamov from Zeropool.
2021-10-26 11:40:56 +02:00
This project was presented on LisCon 2021. [Slides](https://docs.google.com/presentation/d/1CbI6fiWvgwoD_1ahcSR62wD7V4TdSzkdL2RwAeMPagQ/edit#slide=id.gf731d8850e_0_133)
2021-06-16 02:31:31 +02:00
## Usage
```shell
yarn
2021-08-19 18:27:19 +02:00
yarn download
2021-06-16 02:31:31 +02:00
yarn build
yarn test
2022-07-20 13:36:59 +02:00
yarn coverage
2021-06-16 02:31:31 +02:00
```
2022-02-11 21:53:36 +01:00
## Deploy
Check config.js for actual values.
With `salt` = `0x0000000000000000000000000000000000000000000000000000000047941987` addresses must be:
2022-02-16 21:26:27 +01:00
1. `L1Unwrapper` - `0x3F615bA21Bc6Cc5D4a6D798c5950cc5c42937fbd`
2. `TornadoPool` - `0x0CDD3705aF7979fBe80A64288Ebf8A9Fe1151cE1`
2022-02-11 21:53:36 +01:00
Check addresses with current config:
```shell
2022-02-14 11:27:44 +01:00
yarn compile
2022-02-11 21:53:36 +01:00
node -e 'require("./src/0_generateAddresses").generateWithLog()'
```
Deploy L1Unwrapper:
```shell
npx hardhat run scripts/deployL1Unwrapper.js --network mainnet
```
2022-02-14 11:27:44 +01:00
Deploy TornadoPool Upgrade:
2022-02-11 21:53:36 +01:00
```shell
npx hardhat run scripts/deployTornadoUpgrade.js --network xdai
```