Skip to content

First ZK project built on TON blockchain, based on 🌪 Cash

License

Notifications You must be signed in to change notification settings

zktoy/Tonnel-Network

 
 

Repository files navigation

Tonnel Network

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:

How to build

npm install
npm run build

How to run test

npm run test

Important notes

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.

What is Tonnel Network?

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.

Todo

  • 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

Demo

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.

Demo.mp4

About

First ZK project built on TON blockchain, based on 🌪 Cash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.7%
  • Solidity 6.4%
  • Circom 3.1%
  • JavaScript 3.0%
  • Shell 1.8%