> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solana.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Collateral

> Move tokens between wallet and margin, or withdraw excess after a health check.

**Deposit** is wallet → margin vault.

**Withdraw** is margin vault → wallet, gated by `user_withdraw_collateral`. The program revalues the full account and requires post-withdraw health **> 1.1** (or zero debt).

You cannot withdraw collateral that is still required to back debt or Lite positions. Close or reduce those first.

Spot can also swap with **Wallet Balance (WB)** or **Margin Balance (MB)**. MB swaps debit/credit the PDA; WB swaps debit/credit the wallet.
