project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Twister

Transfer tokens privately from 0.001 eth with no maximum limit to one or more accounts.

Twister

Created At

Circuit Breaker

Project Description

There's already a popular protocol for depositing an amount and withdrawing it from another account anonymously, but unfortunately the deposit amounts are predefined. How would you like to be able to deposit any amount, and withdraw that amount in one or more transactions.

To accomplish this miracle twister integrates an ingenious but very simple proof system:

  • To make a deposit we will calculate the proof using the secret and the amount deposited by the user, we will check in the smartcontract that the proof generated corresponds to the amount deposited and the commitment sent.

  • To make a withdrawal the user must enter the secret and the amount previously deposited, which will allow us to generate the appropriate nullifier and find the associated commitment and generate the information to calculate the merkle root such as stored in the smartcontract, he must also indicate the amount he wants to withdraw, the new commitment is in fact a combination of the secret and the current amount - amount to withdraw, he must also indicate the receiver. The smartcontract will then verify that the proof is correct with information on the amount withdrawn, the new commitment, the receiver, the nullifier...

This is how the magic works and it allows us to make 1 or more withdrawals for the same deposit, each withdrawal will generate a new commitment, and therefore we will be able to generate a new nullifier for this commitment. As the commitment is generated from the amount remaining to be withdrawn, we cannot withdraw more than what we deposited, the proof cannot be generated if the new amount is less than 0.

How it's Made

Twister is built with Noir for the circuit prover, scroll as blockchain to deposit and withdraw amounts and sindri to calculate proof.

The smarcontract is built with solidity and use the verifier compiled with noir. The frontend use vitejs, reactjs and noirjs to create proof, nullifier and leaf and sent necessary information to the blockchain.

You can choose to use sindri to create proof on server, or noirjs to create proof on your browser. The backend who interact with sindri is built in Asp.net core.

background image mobile

Join the mailing list

Get the latest news and updates