StarkSwirl is a privacy preserving token mixer that allow users to use the public blockchain Starknet and keep their privacy.
To interact with the application, you need to generate two secret numbers. You can do this on the web page, or you can use another trusted random number generator. These two random numbers will be hashed together and sent to the on-chain contract along with the tokens. The user should store the numbers in a safe place because they will be used during the withdrawal process. By submitting only the hash of these numbers, it ensures that nobody can guess the numbers or revert the hash. This property is called collision resistance. Once this is done, the deposit is complete.
When the user wants to withdraw the tokens from the contract, they can do so from another wallet, ensuring that nobody can link these two wallets. To withdraw, the user will input the secret numbers into a local script that runs on their trusted computer. These numbers remain private, but the script will generate a zero-knowledge (zk) proof that confirms the user knows two numbers which, when hashed together, match a specific hash stored on-chain in a Merkle tree within the contract. With this proof, and nothing more, the user can withdraw tokens to any address they choose, without revealing any information that could link to the initial deposit address.
Backend technologies used:
Smart Contract technologies used:
ZK (Zero-Knowledge) technologies used:
Frontend technologies used: