> ## Documentation Index
> Fetch the complete documentation index at: https://quantumfinance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit and Withdraw BNB from the Trading Vault

> Understand the difference between your wallet balance and vault balance, and how to move BNB in and out of the TradingVault smart contract.

Quantum Finance keeps two separate balances for each user. Your **wallet balance** is native BNB held directly in your Web3Auth wallet — it is yours at all times. Your **vault balance** is BNB you have deposited into the TradingVault smart contract; this is the pool the engine draws from when executing Real mode trades. You must deposit into the vault before the engine can place trades on your behalf.

## Wallet balance vs vault balance

| | Wallet balance | Vault balance |
| - | - | - |
| Location | Your Web3Auth wallet (BNB Chain) | TradingVault smart contract |
| Used for | Gas fees, sends, swaps | Real mode trade execution |
| Visible in | Wallet tab and Trading tab | Trading tab (Vault Liquidity) |
| Access | Always — no lock-up | Withdraw at any time when engine is idle |

## Deposit BNB to the vault

<Steps>
  <Step title="Go to the Trading tab">
    Open the **Trading tab** from the main navigation. Make sure you are in **Real** mode — vault deposits are only relevant for live trading.
  </Step>

  <Step title="Enter a deposit amount">
    In the Trading Setup panel, find the **Deposit** input field (left of the two input fields near the top of the panel). Type the amount of BNB you want to move into the vault.
  </Step>

  <Step title="Click Deposit">
    Click the **Deposit** button. Your Web3Auth wallet prompts you to confirm the transaction. Approve it.
  </Step>

  <Step title="Confirm the updated vault balance">
    After the transaction is confirmed on-chain, the **Vault Liquidity** figure in the Trading Setup panel updates to reflect your new balance.
  </Step>
</Steps>

<Note>
  A minimum of approximately **0.1 BNB** in the vault is recommended to activate Real mode trading. The exact amount required depends on your selected trade amount and the current BNB price.
</Note>

## Withdraw BNB from the vault

<Steps>
  <Step title="Stop the engine if it is running">
    You cannot withdraw while the engine is active. If **STOP ENGINE** is shown, click it and wait for the engine to settle open positions before proceeding.
  </Step>

  <Step title="Enter a withdrawal amount">
    In the **Withdraw** input field (right of the two input fields), type the amount of BNB to return to your wallet.
  </Step>

  <Step title="Click Withdraw">
    Click the **Withdraw** button and confirm the transaction in your wallet. The funds are returned to your Web3Auth wallet balance.
  </Step>
</Steps>

<Warning>
  Always leave at least **0.001 BNB** in your wallet after any withdrawal to cover gas fees for future transactions. If your wallet BNB falls to zero, you will not be able to submit any on-chain transactions.
</Warning>

## How vault requirements are calculated

Before the engine starts a Real mode trade, it checks whether your vault has enough BNB to cover the trade amount:

```
required BNB = trade amount (USD) ÷ BNB price (USD)
```

For example, a $100 trade when BNB is priced at $600 requires:

```
$100 ÷ $600 = 0.1667 BNB
```

If your vault balance is lower than this threshold, the engine will not start and you will see an **INSUFFICIENT VAULT FUNDS** error. Either deposit more BNB or reduce your trade amount.

<Tip>
  The current BNB price is fetched live from CryptoCompare (with Binance as fallback) and displayed in the market ticker at the top of the Trading tab.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.