Skip to main content

Documentation Index

Fetch the complete documentation index at: https://quantumfinance.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Quantum Finance never holds your private keys, your seed phrase, or your wallet credentials. The funds you trade with live in a smart contract on BNB Chain — not on a Quantum server — and you retain the ability to withdraw at any time. This page explains how the wallet layer, the vault contract, and the trading engine connect, and what “non-custodial” means in practice for you as a trader.

Your wallet: non-custodial from the start

When you log into Quantum Finance with Google, Web3Auth creates a non-custodial wallet on your behalf. Web3Auth’s architecture splits your private key into shares using threshold cryptography — no single party, including Quantum Finance, ever has access to your complete key. Your Google account controls one share; you can always recover your wallet as long as you can log in with the same Google account. This wallet is a standard BNB Chain EOA (externally owned account). You can import it into MetaMask or any other BNB-compatible wallet using the private key export option in Web3Auth if you ever want to manage it outside of Quantum.

The TradingVault smart contract

When you switch to real mode and deposit BNB, your funds go into the TradingVault — a smart contract deployed on BNB Chain. The contract is the authoritative record of your balance and profit. Quantum Finance reads and interacts with it, but does not control it in the way a custodial platform controls a user’s account balance. The vault exposes the following key functions:
// Deposit BNB into your vault position
function deposit() external payable

// Withdraw BNB from your vault position
function withdraw(uint256 amount) external

// Withdraw token profits (USDT or USDC) from your vault
function withdrawProfits(address token, uint256 amount) external

// Read your current balance and profit
function getUserInfo(address user) external view returns (
  uint256 balance,
  uint256 profit,
  uint256 lastTradeTime,
  uint256 tradeCount
)
You can call getUserInfo with your wallet address at any time — directly via BscScan or a Web3 provider — to verify your balance independently from the Quantum UI.

The vault flow

1

Deposit BNB

From the Trading tab, enter a deposit amount and confirm the transaction. Your BNB is sent to the TradingVault contract via the deposit() function. The transaction is signed by your Web3Auth wallet.
2

Engine trades on your behalf

When you start the engine in real mode, it executes buy and sell swaps through PancakeSwap using your vault balance as collateral. The vault contract’s executeBuyTrade and executeSellTrade functions handle the on-chain swap logic, including a 1% slippage tolerance calculated dynamically from the PancakeSwap router.
3

Profits accumulate in the vault

Profitable trades result in token (USDT or USDC) flowing back into the vault under your address. You can see your accumulated profit via getUserInfo. Profitable trades also emit a ProfitDistributed event on-chain, which the Quantum UI reads to display your on-chain profit figure.
4

Withdraw at any time

You can withdraw your BNB balance at any time, even mid-session, by entering a withdrawal amount and confirming the transaction. Token profits are withdrawn separately using withdrawProfits. Neither action requires permission from Quantum Finance.

On-chain transparency

Every trade executed in real mode produces an on-chain event. The relevant contract events are:
EventWhen it fires
DepositedYou deposit BNB into the vault
WithdrawnYou withdraw BNB from the vault
TradeExecutedThe engine executes a buy or sell swap
ProfitDistributedA trade closes and profit is split between you and the Quantum treasury
EmergencyWithdrawAn emergency withdrawal is triggered
You can view these events in real time on BscScan Testnet by searching for your wallet address or the contract address.
The current deployment runs on BNB Smart Chain Testnet (Chain ID: 97). When Quantum Finance moves to mainnet, the contract address and chain ID will be updated in the app configuration and announced in the documentation.

No platform risk on your deposits

Because the vault is a smart contract — not a custodial account — your BNB balance is not commingled with other users’ funds in a platform-controlled wallet. The contract tracks each user’s balance individually. If Quantum Finance’s servers went offline, your funds would remain in the contract and you could withdraw them directly by calling withdraw() via any BNB Chain interface.
Real mode requires a minimum vault balance to execute trades. You need at least approximately 0.1 BNB in the vault before the engine can open a position. If your vault balance falls below the amount required for the configured trade size, the engine will block the session start and display an “Insufficient Vault Funds” message.

Demo mode vs. real mode

In demo mode, no funds are deposited to the vault and no on-chain transactions occur. Your demo balance is a virtual ledger managed by Quantum’s database. Demo mode exists so you can test strategies and understand how the engine behaves before committing real funds.
Start with demo mode to get familiar with the engine’s behavior, then switch to real mode once you are comfortable with the strategy you have chosen and the risk-to-reward profile of your selected pair.