Withdraw
Turn hSOL or hUSDC back into SOL or USDC in your wallet.
A withdraw turns hSOL or hUSDC back into SOL or USDC in your wallet. The program burns what you withdraw and releases the same amount from the vault. The fee is 0.10% of the amount.
Before you start
You withdraw from available, so apply anything pending you want to include. The withdraw amount is public, like a deposit's. What stays in your Hush account remains a ciphertext.
In the app
Open Withdraw
Connect and unlock, then open Withdraw.
Pick the asset and the amount
The screen shows what leaves your encrypted balance, the fee, and what lands in your wallet.
Press Withdraw
Your browser builds the 2 proofs of a withdraw: equality and range. They show that your available balance covers the amount. Then your wallet asks you to approve.
Let it run
The screen follows two steps: Withdraw moves the amount out of your encrypted balance into your account's public balance, and Burn and release burns it there and pays from the vault.
Done
The plain SOL or USDC is in your wallet. Receipt opens the transaction.
The numbers
Withdrawing 500.00 USDC:
| USDC | |
|---|---|
| Leaves your encrypted balance | 500.00 |
| Burned as hUSDC | 500.00 |
| Released from the vault | 500.00 |
| Fee at 0.10% | 0.50 |
| Arrives in your wallet | 499.50 |
The fee goes to the fee recipient, and from there it buys HUSH and burns it. Fees and the HUSH token has the detail.
What happened on chain
| Step | What the chain records |
|---|---|
| Proofs | 2 proofs verified by the ZK ElGamal Proof program |
| Confidential withdraw | The amount moved out of your encrypted balance, as a public number |
| Burn and release | The amount burned, and SOL or USDC paid from the vault to your wallet and the fee recipient |
In code
From a terminal: hush withdraw --asset usdc --amount 100, which runs both steps and prints the fee. See the CLI.
A withdraw is buildWithdraw from the SDK, then api.buildWithdraw for the release, with the same amount. See the SDK's actions and the API's buildWithdraw.