Tonnel-Network / core

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

Home Page:https://tonnel.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

https://tonnel.network

License:Apache License 2.0


Languages

Language:TypeScript 83.3%Language:Circom 7.9%Language:Solidity 4.1%Language:JavaScript 3.5%Language:Shell 1.2%