Back in December, the Tornado cash team proposed the novel idea of Anonymity Mining. It consists in incentivising people to increase the anonymity set by depositing more funds into the pool.
You can read more in the original Medium post here:
Today I want to give an overview of the smart contracts involved and the different steps. Here is an overview diagram of all the contracts involved:
Click here for interactive version with link to all smart contracts code.
You can find the Tornado ETH pools at the bottom right and the TORN token itself on the top left.
Anonymity mining steps:
-
First the user need to deposit Ether in one of the Tornado cash pools. The pools currently supporting mining are the 0.1 ETH, 1 ETH, 10 ETH and 100 ETH. The more the user deposit funds the more reward per block the user gets. Please refers to the Medium post to know the exact reward parameters. The introduction anonymity mining introduced a new contract, the TornadoProxy
that will register in the TornadoTrees
contract the block number of a deposit by calling the registerDeposit
function.
-
After some period of time the user will withdraw his deposit using a relayer. Note that the longer you stay in the pool the more reward you will be able to claim. Here again, the proxy call the TornadoTrees
contract to register the withdrawal block number.
-
The user is due some rewards but cannot yet claim the reward. First the Merkle Trees in TornadoTrees
need to be updated to include the deposits and withdrawals involved. For this, a stakeholder of the system need to call the updateRoots
function with the adequate data. The user will not necessarily need to call the function himself, someone else might be doing it for him.
-
The user can now claim the reward in the form of AP (anonymity points) using his secret note. The reward claim is completely anonymous. The user can use a relayer and the AP are credited to a secret account not linked to any Tornado deposit or withdrawal. The reward claim works by generating a zero knowledge proof of ownership of an entry in the TornadoTrees
contract created at step 1. and 2.
-
The final step is to exchange the AP in the secret account for TORN tokens. A Relayer can excahnge the TORN to stay anonymous. The exchange rate of AP/TORN fluctuate as people claim TORN and more reward is added to the AMM exchange pool. Please refer to the Medium post for more information on how to calculate the exchange rate.