Change repo structure & add script to for IPFS deployment and build commands

This commit is contained in:
Theo 2023-07-26 07:36:06 -07:00
parent 0785bc0000
commit c990d0859c
174 changed files with 274 additions and 62 deletions

2
.env.example Normal file

@ -0,0 +1,2 @@
PINATA_API_KEY=
PINATA_SECRET_API_KEY=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

4
.gitignore vendored Normal file

@ -0,0 +1,4 @@
.env
node_modules
_book
build

1
.nvmrc Normal file

@ -0,0 +1 @@
v10.24.1

@ -1,72 +1,24 @@
# Introduction to Tornado Cash
# Tornado Cash Documentation
![](/.gitbook/assets/image.png)
> UI for non-custodial Ethereum Privacy solution
{% hint style="danger" %}
*Tornado Cash was sanctioned by the US Treasury on 08/08/2022, making it illegal for US citizens to interact with the core and governance contracts.*
{% endhint %}
Tornado Cash is a **non-custodial** **privacy protocol** allowing **permissionless** shielded transactions on Ethereum and derivative networks. **Tornado Cash is not a mixer, as assets are never commingled due to the presence of zero knowledge cryptography**. The core of the protocol is ungovernable and immutable, given Ethereum's distributed state and the provenance of the contracts, they can neither be changed nor tampered with.
Therefore, nobody - including the original developers - can modify or inhibit the protocol. All governance and associated smart contracts are deployed by the community. As a non-custodial protocol, users keep custody of their cryptocurrencies while using Tornado Cash. This means that at each deposit, they are provided with a secret "note" that grants the access to the deposited funds, allowing self-soverginity over one's assets.
### Read static content
## How is anonymity achieved?
Entrypoint here: [docs](book/README.md)
Tornado Cash achives anonymity by breaking the on-chain link between source and destination addresses through "anonymity pools". These are immutable smart contracts that accepts fixed denominations of a currency, acting as what is known as a mix network. Although anonymity is only obtained with use of a "relayer", which acts as a withdrawal proxy to mask the link between destination and source addresses.
### Building locally
Learn more about [_How does Tornado Cash work?_](general/how-does-it-work.md) and [Tips to remain anonymous](general/guides/opsec.md).
* Install [Node.js](https://nodejs.org) version 10.24
* If you are using [nvm](https://github.com/nvm-sh/nvm) (recommended) running `nvm use` will automatically choose the right node version for you.
* Install dependencies: `npm i`
* Install gitbook dependencies: `npm run prepare`
* Build gitbook to static content: `npm run build`
## Where is Tornado Cash deployed?
## Deploy on IPFS
Since its inception in 2019, Tornado Cash has been mainly operating **on the Ethereum network**, with anonymity pools for ETH, DAI, cDAI, USDC, USDT and WBTC.
* Copy `.env.example` file to `.env`
Since June 2021, the smart contracts **have also been deployed on other side-chains & blockchains**. These deployments enabled network agnostic functionality, allowing for faster and cheaper transactions.
* **Ethereum**
* **ETH** (Ethereum)
* **DAI** (Dai)
* **cDAI** (Compound Dai)
* **USDC** (USD Coin)
* **USDT** (Tether)
* **WBTC** (Wrapped Bitcoin)
* **Binance Smart Chain**
* **BNB** (Binance Coin)
* **Polygon**
* **MATIC** (Polygon)
* **Gnosis Chain (formerly xDAI)**
* **xDAI** (xDai)
* **Avalanche**
* **AVAX** (Avalanche)
* **Optimism**
* **ETH** (Ethereum)
* **Arbitrum One**
* **ETH** (Ethereum)
Until December 2021, governance enabled "anonymity mining" - a mechanism to incentivise proactive usage of selected anonymity sets to compliment pool entropy, allowing depositors to earn the native governance token (**TORN**).
_See sections_ [_Anonymity mining_](circuits/anonymity-mining) _and the_ [_TORN token_](general/token/index.md) for more information.
**The protocol's native governance token, TORN, allows open and decentralized collaboration to shape the direction of the protocol through voting.**. The community has a strong influence over the evolution of Tornado Cash, it's development and management of the protocol's treasury.
Anonymity pools operate **under the principle of fixed-amount deposits and withdrawals**. Meaning that each supported asset has multiple pools which make up an "anonymity set", each pool restricts transactions to be a fixed amount _(e.g. ETH has four different pools, one for each of these amounts: 0.1, 1, 10 and 100 ETH)_.
### Tornado Cash Nova
With the release of a [**new __experimental__ version of Tornado Cash; Nova**](https://tornado-cash.medium.com/tornado-cash-introduces-arbitrary-amounts-shielded-transfers-8df92d93c37c), provides an **upgraded expierence for anonymity pools**. Users are no longer constrained by fixed-amount transactions, possible through the UXTO model alllowing **arbitrary (customized) amounts and shielded internal transfers**.
Tornado Cash Nova is deployed on Gnosis Chain (formerly xDAI) with the original hopes to improve speed and cost by bridging from Ethereum mainnet using the AMB Omnibridge.
__Please note Tornado Cash Nova has a low relayer count, is in an experimental state and regularly faces issues with Omnibridge because of bridge limits and validator censorship__.
## How does Tornado Cash function?
Tornado Cash is represented by it's community, collaboration is facilitated through the governance contract or Decentralized Autonomous Organisation (DAO). **No singular entity or person controls Tornado Cash.**
All protocol related code is open-source and is published to two independent git instances:
* [Community git](https://git.tornado.ws): store of the latest community maintained repositories
* [Sanctioned Github](https://github.com/tornadocash): public archive after the OFAC sanctions
The existence of zero knowledge in the protocol was based **on open-source research authored by ZCash**. To implement a zero knowledge scheme, [a trusted setup is required](https://tornado-cash.medium.com/tornado-cash-trusted-setup-ceremony-b846e1e00be1), which is essentially a store of random data from various sources defining robustness in generation of proving and verifying keys. Which successfully occured for the protocol on [May 2020 with 1114 contributions](https://tornado-cash.medium.com/the-biggest-trusted-setup-ceremony-in-the-world-3c6ab9c8fffa). This significant number of contributors makes it implausible to compromise the protocol by faking zero-knowledge proofs.
Tornado Cash user interfaces are hosted on **IPFS** (InterPlanetary File System) deployed by the community, minimizing the risk of censorship. These interfaces will be accessible as long as IPFS nodes pin the content, the latest IPFS content hashes are available at [tornadocash.eth](https://app.ens.domains/name/tornadocash.eth/details) and [nova.tornadocash.eth](https://app.ens.domains/name/nova.tornadocash.eth/details). Please see [how to pin IPFS content](https://docs.ipfs.tech/how-to/pin-files/) if you wish to contribute.
- Make sure you set `PINATA_API_KEY` and `PINATA_SECRET_API_KEY` environment variables in `.env`
- To deploy a production build run `npm run deploy:ipfs`

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 421 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 421 KiB

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 1014 KiB

After

Width:  |  Height:  |  Size: 1014 KiB

Before

Width:  |  Height:  |  Size: 1014 KiB

After

Width:  |  Height:  |  Size: 1014 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 307 KiB

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before

Width:  |  Height:  |  Size: 961 KiB

After

Width:  |  Height:  |  Size: 961 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 708 KiB

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 403 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 519 KiB

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before

Width:  |  Height:  |  Size: 400 KiB

After

Width:  |  Height:  |  Size: 400 KiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 386 KiB

After

Width:  |  Height:  |  Size: 386 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Before

Width:  |  Height:  |  Size: 799 KiB

After

Width:  |  Height:  |  Size: 799 KiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Some files were not shown because too many files have changed in this diff Show More