Withdrawals

Withdraw is the operation of nullifying an existing Hinkal commitment and converting it into publicly visible ERC tokens with the same value as the burnt commitment.

Withdraw is a similar operation to Transfer, but instead of transferring assets between shielded addresses, users can withdraw their shielded assets to their public address.

Similarly to transfers, users can:

  • Select the token they want to withdraw

  • Insert the recipient address (it must be a public address)

The main difference with ‘Transfers’, is that users can manually choose over 2 types of withdrawal:

  1. Withdraw on their own: users have to sign a message and pay gas fees from their connected wallet address.

  2. Withdraw using a Relayer: let’s suppose a wallet address is created recently and does not have the required amount of funds to cover gas fees associated with a withdrawal transaction. As in the first option, the user has to provide the recipient address, but no prior balance is needed in that address, since the Relayer is incurring the associated gas fees.

Same as Swaps, if the user selects withdrawing with Relayer, the Relayer covers gas fees and slippage costs. Check out Hinkal's current fee structure used to fairly compensate for the costs. Note that when a user withdraws without Relayer, they sign the transaction and pay gas fees as in a normal transaction and only the Hinkal commission is subtracted.

During the withdrawal, the user generates a zk-SNARK, which is sent to Hinkal Pool smart contract, that verifies the validity of the proof and checks Nullifier Hash. The Nullifier Hash produced during the verification allows Hinkal Pool smart contract to ensure that the withdrawal is made only once.

Last updated