rework layout

This commit is contained in:
gozzy 2023-01-28 09:33:53 +00:00
parent be9d165d94
commit aed60eeef8
19 changed files with 30 additions and 20 deletions

View file

@ -0,0 +1,69 @@
# Minified UI Hosted Locally
Tornado Cash protocol can be launched locally on your computer through a minified User Interface version made available by the core developers team.
### Step #1: Clone the Github repository on your computer
By opening your Command Line Interface, you can run the following commands to, first, clone the repository, then go inside the newly copied folder:
```
git clone https://github.com/tornadocash/ui-minified.git
cd ui-minified
```
### Step #2: Serve the Folder with Your Favorite HTTP Server
```
python -m SimpleHTTPServer 8080
```
You can obviously use any other http web server, such as[ npmjs.com/package/http-server](https://www.npmjs.com/package/http-server).
### Step #3: Run the UI on Localhost on your Favorite Web Browser
To finish, you just need to run [http://localhost:8080](http://localhost:8080) on your Web Browser & let the magic happens 🪄
## Running a TOR service
If you wish to serve tornado cash UI on an .onion domain, there is an easy way to do it using docker-compose.
* You need to paste the following into `docker-compose.yml`
```
version: '2'
services:
tornado_ui:
image: tornadocash/ui
restart: always
container_name: tornado_ui
watchtower:
image: v2tec/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 60 tornado_ui
tor:
image: strm/tor
restart: always
depends_on: [ tornado_ui ]
environment:
LISTEN_PORT: 80
REDIRECT: tornado_ui:80
# Generate a new key with
# docker run --rm --entrypoint shallot strm/tor-hiddenservice-nginx ^torn
PRIVATE_KEY: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
```
* Then, just run the following command:`docker-compose up -d`
Enjoy your Tornado Cash UI 🌪
_This tutorial is inspired from the_[ _README.md document_](https://github.com/tornadocash/ui-minified/blob/gh-pages/README.md) _present in the Github repository._
__
_Written by_ [_@ayefda_](https://torn.community/u/ayefda)

27
general/tutorial/opsec.md Normal file
View file

@ -0,0 +1,27 @@
# Tips to Remain Anonymous
The Tornado Cash tool allows you to remain anonymous on-chain. However, if the tool is used without protecting oneself upstream and downstream, there is no point and the anonymity would only be partial. There are practices to avoid this.
### Use TOR and/or a VPN
Your internet service provider (ISP) identifies you with an IP address. To prevent third parties from knowing that you are using Tornado.cash, you should consider [using TOR](how-to-use-tornado-cash-with-tor.md) and/or a VPN for your transfers. Avoid using free VPNs, they tend to keep or even sell your data. There are several VPNs on the market boasting a "no-log policy".
### Save your note in a safe place <a href="#save-your-note-in-a-safe-place" id="save-your-note-in-a-safe-place"></a>
Your note provides a record of your original transaction. Anyone who has it can withdraw the funds deposited, but also know the deposit address. Be sure to keep this note away from prying eyes and store it in a secure environment.
### Delete data <a href="#delete-data" id="delete-data"></a>
Your browser is a real source of information for the extensions you use. Delete your data after each deposit or withdrawal. If two transfers are made with the same cookies, the extension you are using will be able to link these two transactions.
### Be patient <a href="#be-patient" id="be-patient"></a>
![](https://gblobscdn.gitbook.com/assets%2F-MXflGk4w5pDjjlmPCuF%2F-MgQVRqU6Ff6ypW\_Q-fV%2F-MgQW0ko2bOUYlnsuG0F%2Fozxj.png?alt=media\&token=1debad58-aa3c-4638-9d18-1636e87e3d0a)
Your anonymity also depends on the number of transactions after your deposit (cf. Statistics tab above). If you withdraw your funds immediately after depositing them, it is possible to link your deposit to your transfer using correlation probabilities. The longer you wait, the greater your anonymity set will be.
### Use multiple addresses
A 7 x 10eth deposit from one address and a 7 x 10eth withdrawal to a single address can also be linked. Remember to multiply your withdrawal addresses.
_Written by_ [_**@bt11ba**_](https://torn.community/u/bt11ba/)

121
general/tutorial/relayer.md Normal file
View file

@ -0,0 +1,121 @@
# How to become a relayer?
Following the execution of [Tornado Cash 10th governance proposal](https://tornadocash.eth.link/governance/10), anyone can become a relayer for Tornado Cash users.
{% hint style="success" %}
The only condition to be included on the Tornado Cash UI is to lock a min. of `300 TORN`\*. To remain listed, it is needed to keep enough TORN locked (\~`40 TORN` at the moment in April 2022) to be able to pay back the transaction fee to the staking contract.
{% endhint %}
\*_This minimum stake can be changed by a governance vote at any time._
Relayers form an essential & necessary part of the Tornado Cash ecosystem. Their use guarantees privacy as they solve the infamous “fee payment dilemma” : how to pay fees for token withdrawals from a pool while maintaining anonymity?
Therefore, relayers act as third parties and manage the entire withdrawal. They pay for transaction fees by deducting them directly from the transferred amount. They also charge an additional fee for their services.
Since the implementation of the [Relayer Registry proposal](https://tornadocash.eth.link/governance/10), the protocol collects a fee directly from the relayers staked balance through the `StakingReward` contract for each withdrawal. This fee percentage may vary from one pool to another and is also subject to change through on-chain governance.
Currently, it is fixed at `0.3%` . Some pools remain without fees, either because the instance is too small to assign a fee (0.1 ETH, 100 DAI/USDT, 1000 DAI/USDT), or because there is not enough liquidity on Uni v3 (all cDAI instances).
## How to Become a Relayer?
Anyone can become a relayer for the protocol in **6 simple steps** through a [Relayer Registry User Interface (UI)](https://relayers-network.tornadocash.eth.limo).
Below you will find everything your need to join our relayers' club & get listed on Tornado Cash decentralized relayer registry.
### 1. Warning: Understand & Accept Potential Risks
Before you commit to sharing part of your journey with Tornado Cash users as a relayer, you need to understand & accept all potential risks of being a relayer for the protocol.
#### How a Relayer is chosen by user interface
The formula for designating a relayer is as follows:
* The list of all registered relayers is retrieved from the Relayer Registry smart contract.
* For each relayer, calculate a score based on its staked TORN and its fee. The higher the stake, the higher the score is; the higher the fee, the lower the score is. For Ethereum mainnet, the formula used to calculate the score is `stake * [1 - 25*(fee-0.33)^2]`; for sidechains, the formula is `stake * [1 - 11.89*(fee-0.01)^2]`.
* Then randomly pick a relayer, weighted by its calculated score.
### 2. Set up Relayer
The first concrete step is to run the Tornado Cash Relayer software for Ethereum Mainnet on your computer. All steps are outlined in the protocol's github. To complete this task successfully, you will have to carefully follow [these instructions](https://github.com/tornadocash/tornado-relayer#deploy-with-docker-compose).
Once completed, you will need to insert your url in the input box.
![](<../.gitbook/assets/2 (1).png>)
{% hint style="warning" %}
It is strongly recommended that you use your own RPC nodes. Instructions on how to run full nodes can be found [here](https://github.com/feshchenkod/rpc-nodes).
{% endhint %}
### 3. Set Up ENS Subdomain
The next steps entail:
* Creating an ENS domain for your relayer.
* Setting up its mainnet subdomain.
* Adding a TXT record with the Relayer URL to the mainnet subdomain according to this specific format:
#### **Ethereum Relayers (Mandatory)**
| TXT record |
| ----------------------- |
| mainnet-tornado.xxx.eth |
| goerli-tornado.xxx.eth |
#### **Sidechains Relayers (Optional)**
You also have the option to add subdomains with their corresponding TXT records to support chains other than Ethereum. Sidechains relayers use a different version of the Relayer software. The complete requirements with instructions are found [here](https://github.com/tornadocash/tornado-relayer/blob/light/README.md).
| TXT record |
| ------------------------- |
| bsc-tornado.xxx.eth |
| gnosis-tornado.xxx.eth |
| polygon-tornado.xxx.eth |
| optimism-tornado.xxx.eth |
| arbitrum-tornado.xxx.eth |
| avalanche-tornado.xxx.eth |
#### **Nova Relayer (Optional)**
Tornado Cash Nova uses its own version of the software. If you wish to become a relayer for Tornado Cash Nova, you will find instructions to follow [here](https://github.com/tornadocash/tornado-pool-relayer#deploy-with-docker-compose).
| TXT record |
| ------------------- |
| gnosis-nova.xxx.eth |
![](../.gitbook/assets/3.png)
### **4. Set Up Workers**
Workers are the addresses that will allow your relayer to send ZK-proofs to users. By default, the first worker is the ENS domain owner's address.
To ensure an extra level of security, we advise you to set up more than one worker.
Only the mainnet requires you to register workers. All other networks do not require the use of registered workers.
![](../.gitbook/assets/4.png)
### 5. Stake
With the implementation of a decentralized relayer registry, a staking condition has been introduced as a requirement to become listed on Tornado Cash UI. Keep in mind **staking TORN is now necessary to be added to the recommended list of relayers.**
The minimum staked amount is currently set by Tornado Cash governance at **`300 TORN`**. This threshold can be changed by Tornado Cash governance at any time.
When a relayer is used in the Tornado Cash pool, a small amount of TORN is automatically collected from this staked balance by the `StakingReward` contract. This element is essential to keep in mind as relayers will need to keep enough TORN locked (\~`40 TORN` at the moment in April 2022) to be able to pay back the transaction fee to the staking contract.
The collected fees are subsequently distributed among DAO members with locked TORN tokens. TORN are usually locked to participate in on-chain governance (submitting & voting on proposals). You can find more information both on this [forum post](https://torn.community/t/proposal-relayer-registry-setting-parameters-after-audit/2134) & in the [Staking TORN documentation page](staking/).
{% hint style="warning" %}
Your staked TORN amount is not claimable, and it is non-refundable.
{% endhint %}
![](../.gitbook/assets/5.png)
### 6. Summary: Final Verification & Registration
Last but not least, we advise you to **double-check all information** displayed in the Summary before registering.
![](../.gitbook/assets/6.png)
_Welcome to the relayer team! Thanks to you, privacy can be better respected_ 💚
_Written by_ [_**@bt11ba**_](https://torn.community/u/bt11ba/) _&_ [_**@ayefda**_](https://torn.community/u/ayefda)

65
general/tutorial/tor.md Normal file
View file

@ -0,0 +1,65 @@
# How to use TOR with Tornado Cash
On-chain confidentiality is ensured by the [Tornado Cash](https://tornado.cash) tool.
However, before and after your transactions are executed, your privacy may not be ensured. That's why we advise you to use TOR when you use Tornado Cash.
Here is a quick and easy tutorial to ensure your anonymity.
### Step **#1 - Install** TOR
First, go there: [https://www.torproject.org/download/](https://www.torproject.org/download/)
Choose the appropriate operator system and click on Download.
Then, run it.
### Step **#2 - Configure** TOR
First, search for `about:config` on your URL navigation bar.
![](../.gitbook/assets/aboutconfig.png)
Then, accept the caution message by clicking on `Accept the Risk and Continue`.
![](../.gitbook/assets/aboutconfig2.png)
Search for `wasm` and turn `javascript.options.wasm` on true.
![](../.gitbook/assets/wasm.png)
Search for `indexedDB` and turn `dom.indexedDB.logging.details` and `dom.indexedDB.logging.enabled` on true
![](../.gitbook/assets/indexeddb.png)
### Step **#3 -** Install Metamask
Go there: [https://metamask.io/download/](https://metamask.io/download/)
First, click on `Install Metamask for Firefox`.
![](../.gitbook/assets/metamaskhome.png)
Click on `Add`.
![](../.gitbook/assets/addmetamask.png)
Allow addons.mozilla.org to install an add-on by clicking on `Continue to Installation`.
![](../.gitbook/assets/downloadinstall.png)
Confirm that you allow this extention to run in Private Windows, then click on `Okay`.
![](../.gitbook/assets/allowprivateclickokay.png)
Then, you can add Metamask to your toolbar, by doing a right click on it and dragging Metamask icon to your toolbar.
![](../.gitbook/assets/metamaskicon\(1\).gif)
### Step **#4 - Enjoy your privacy** :sunglasses:****
You can now use [Tornado Cash Classic](https://tornadocash.eth.link) or [Tornado Cash Nova](https://nova.tornadocash.eth.link) with TOR.
_Written by_ [_**@bt11ba**_](https://torn.community/u/bt11ba/)