Skip to main content

Withdraw SOL

Withdraw SOL from your private balance to any recipient address.

Parameters

Returns

Example


Withdrawal Fees

Fee Calculation Example


How Withdrawals Work

1

UTXO Selection

The SDK selects your largest UTXOs to cover the withdrawal amount
2

ZK Proof Generation

A zero-knowledge proof is generated proving you own the funds
3

Relayer Submission

The proof is sent to the relayer, which signs and submits the transaction
4

Funds Received

The recipient receives funds with no on-chain link to your wallet

Privacy Guarantee

The withdrawal transaction on-chain (visible on SolScan or other explorers) contains no information about the original depositor. The zero-knowledge proof ensures:
  • The relayer cannot modify the recipient address
  • The relayer cannot modify the amount
  • Any tampering causes the transaction to fail

Partial Withdrawals

If your private balance is less than the requested amount, the SDK performs a partial withdrawal:

Withdraw to Self

If you omit recipientAddress, funds are withdrawn to your own wallet:
Withdrawing to your own wallet reduces privacy since it links your deposit and withdrawal addresses.

Best Practices

Use Clean Wallets

Always withdraw to a fresh, never-used wallet address

Wait Before Withdrawing

Wait at least a day between deposit and withdrawal

Split Withdrawals

Split large amounts into multiple smaller withdrawals over time

Vary Amounts

Don’t withdraw the exact same amount you deposited

Example: Privacy-Optimized Withdrawal


Error Handling

Common Errors