How Mixer works?
Last updated
Last updated
Privacy Mixer is a one-way cryptographic hashing algorithm where a user can deposit any amount of money into PivotSwap by inputting the 'splitting array', a sequence of numbers that collectively represent the total assets intended for deposit.
Following the deposit, a unique Private Note—comprising a combination of random numbers and letters—is generated and discreetly transmitted to the user. This private note serves as a unique identifier associated with the user's deposit and must be saved for future reference.
PivotSwap utilizes a Merkle Tree structure for the Privacy Mixer, allowing for efficient and secure handling of large datasets by organizing data into a hierarchical tree format.
Initially, all user inputs, including transaction details and privacy preferences, are organized into a Merkle Tree. This tree is constructed by pairing and hashing each individual piece of data (transaction details) at the leaf level and then combining these hashes iteratively until a single root hash, known as the Merkle Root, is generated. This root hash serves as a unique identifier for the entire set of data, encapsulating the entire dataset in a single hash value.
The Merkle Root hash is securely stored within the PivotSwap Privacy Mixer Contract. When a user interacts with the Privacy Mixer Contract (e.g., withdraw, swap), they provide proofs that their transaction details are included in the Merkle Tree without revealing the specific details themselves. Once the 'proof' is proven to be accurate, the Relayer will submit requests to the Privacy Mixer Contract for further action.
The contract utilizes the Merkle Tree structure to obscure the linkage between the sender's input and the recipient's output. This process involves selecting appropriate branches of the Merkle Tree to conceal transaction details effectively. To validate the privacy-enhancing process, the Privacy Mixer Contract generates a cryptographic proof demonstrating that the transaction is included in the Merkle Tree without revealing the user's wallet addresses to external observers.
Groth16 algorithm (ZK-SNARKs) is used to reduce data costs and processing times.