How the mixer works
Last updated
Last updated
HYC is developed as a totally permissionless and decentralized transaction mixer. That means all funds are held by smart contracts and withdraws can only be claimed by the original depositors, there is no way for protocol developers or any third party to withdraw liquidity from the contract.
The diagram above illustrates the difference between a regular transaction and a mixed transaction.
In a regular transaction, Account 1 transfers an number of tokens to Account 2. This transaction will then forever be stored in the blockchain and can be queried by users, analytics robots and hackers.
In a mixed transaction, N different accounts deposit to the mixer - in the image illustrated by Accounts 1, 2 and 3, in practice a huge number of transactions can happen simultaneously. N different accounts also withdraw from the mixer - represented by Accounts A, B and C.
However, it is not possible to determine who transferred the tokens to whom.
Mixers originally came up in the Bitcoin ecosystem. They worked by pooling together funds into an account and then redistributing them to accounts informed to the owner of the pool through off chain methods.
This centralized approach exposes users to a series of dangers:
The owner of the pool can be malicious and steal funds
The custodial nature of the pool incentives users to withdraw funds fast - reducing the anonymity gained from the procedure
Regulators consider centralized mixers as money transmitters in the US
Regular mixers may also be helping criminals launder money since they don't offer AML features
A ZK mixer, on the other hand, is entirely controlled by code. This means no one can mess with funds and users can thus keep funds in the contract for a long time, improving anonymity.
The ZK mixer works by having each deposit commit a hash of a secret value (Ticket) to a merkle tree on the contract. To withdraw the funds deposited, a user needs to provide a ZK proof that they know the secret value of one of the merkle tree's leaves.
This proof can be submitted by any account and does not reveal any information about the origin of the funds. However, that proof still guarantees that AML procedures are followed, as explained in the AML section.