📩Depositing and Withdrawing

To make a deposit, a user generates a secret and sends its hash (called a commitment) along with a desired deposit amount to the Hole smart contract. The contract accepts the deposit and adds the commitment to its list of deposits.

Later, that user can make a withdrawal with a different wallet. In order to do that, the user should provide proof that they possess a secret to an unspent commitment from the smart contract’s deposit list.

Deposit

To make a deposit, a user generates a secret and sends its hash (called a commitment) along with a desired deposit amount to the Hole Cash smart contract. The contract accepts the deposit and adds the commitment to its list of deposits.

Wait

After depositing, the user should wait some time before withdrawing to improve their privacy

Withdraw

The user can then make a withdrawal with a different wallet anonymously. In order to do that, the user only needs to show that they possess a secret to an unspent commitment from the smart contract’s deposit list.

The zkSnark technology allows doing that without revealing which exact deposit matches the secret. The smart contract will then verify the proof and transfer the deposited funds to the private address specified for the withdrawal. No external observer will be able to determine which deposit this withdrawal comes from.

That’s how it works. Simple, clean, private.

Last updated