This is the first fully functioning tornado-core implementation on TON blockchain. It is based on circom and snarkjs libraries. It is a fully decentralized and trustless implementation. It is also the first implementation of circom and snarkjs on TON blockchain.
This repository contains the following components and it's based on this repository:
- Circom circuits in the circuits folder
- Func contracts in the contracts folder
- Tests in the test folder that covers a few different scenarios
npm install
npm run build
npm run test
This is only working on testnet now. It is not working on mainnet until the next update of TON blockchain and BLS12-381 opcodes are added to the mainnet.
Tonnel Network is a fully decentralized and trustless implementation of tornado cash on TON blockchain. It will let users deposit TON into a smart contract and withdraw them later in a way that the deposited TON are not linked to the withdrawn TON. Users can deposit TON in a specific denomination and withdraw them later in the same denomination.
- Implement the merkle tree functionality and write tests for it
- Implement the MIMCSponge hash function in func(It was too expensive so I used Sha256 instead)
- Implement the deposit and withdraw functionality and write tests for them
- Build a frontend for the contract (I will need help with this, contact me on TG if you are interested:) - The current version of the frontend is here
- Implement an indexer for the contract so that the frontend can easily generate the merkle tree and proofs for withdraw
You can see a demo of the contract here. It is deployed on testnet and you can deposit and withdraw TON on it. The frontend is fully functional but it is not optimized yet. It is only for testing purposes.