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

# Wallet Management

> Manage your wallets, swap tokens, withdraw funds, and export private keys

## Your Wallets

Onsight automatically creates a secure wallet for you when you first start the bot:

<Card title="Polygon Safe" icon="shield">
  **For trading on Polymarket** with institutional-grade Gnosis Safe security
</Card>

## Wallet Security

<Warning>
  Your private keys are encrypted with AES-256 encryption and stored securely. Onsight never transmits your keys over the internet or shares them with third parties.
</Warning>

### How Your Wallets Are Secured

<Steps>
  <Step title="Key Generation">
    When you start the bot:

    1. Private keys generated locally
    2. Encrypted immediately with AES-256
    3. Stored in encrypted database hosted by institutional provider
    4. Original keys never stored in plaintext

    <Check>
      Your keys never leave the secure environment unencrypted.
    </Check>
  </Step>

  <Step title="Polygon Safe Setup">
    Your Polygon wallet uses Gnosis Safe for enhanced security:

    * Safe wallet controlled by your EOA (Externally Owned Account)
    * Token approvals limited to exact amounts needed
    * All transactions signed cryptographically
    * Compatible with MetaMask and other wallets

    <Info>
      Gnosis Safe is used by major protocols for multi-million dollar treasuries. It's battle-tested and secure.
    </Info>
  </Step>

  <Step title="Transaction Signing">
    Every trade you make:

    1. Transaction built locally
    2. Signed with your encrypted private key
    3. Submitted through Polymarket relayer
    4. Never requires your actual private key to leave storage

    <Tip>
      Gasless transactions via relayer mean you never need MATIC for gas fees.
    </Tip>
  </Step>
</Steps>

## Token Swaps at Deposit

Deposits automatically swap from 13 chains and over 50 currencies to USDC.e on Polygon for trading.

<Steps>
  <Step title="Deposit to Onsight Bot">
    From the home screen:

    1. Go to **Deposit**
    2. Select the chain you want to deposit from
    3. Copy the deposit wallet address
    4. Send funds to the deposit wallet address

    <Danger>
      Always verify you are sending to the correct address on the correct chain. Incorrectly sent funds may not be recoverable.
    </Danger>
  </Step>

  <Step title="Funds Automatically Swap">
    Funds sent for deposit automatically swap using Polymarket's relayer system.

    1. Deposit address receives funds
    2. Polymarket relayer bridges and swaps
    3. USDC.e on Polygon becomes available for trading

    <Info>
      For large swaps over \$50k USD, Polymarket recommends using a third party swap provider like [deBridge](https://app.debridge.com/) or [Portal](https://portalbridge.com/).
    </Info>

    <Check>
      You can continue using the bot while swap processes in the background. You'll get a notification when complete.
    </Check>
  </Step>
</Steps>

## Withdrawals

Send USDC.e from your Polygon wallet to any external address - **completely gasless**:

<Steps>
  <Step title="Start Withdrawal">
    From the home screen:

    1. Go to **Wallets**
    2. Click **Withdraw**
    3. You'll see your available balance:
       * USDC.e (bridged USDC)
       * USDC (native)
       * Total available
  </Step>

  <Step title="Enter Destination Address">
    1. Click **📝 Enter Withdrawal Address**
    2. Type or paste Polygon/Ethereum address
    3. Format: `0x...` (42 characters)

    <Warning>
      **Critical:** Verify the address carefully!

      * Wrong address = permanent loss of funds
      * Use copy/paste to avoid typos
      * Send small test amount first if unsure
      * Only use Polygon/Ethereum addresses (not Bitcoin, Solana, etc.)
    </Warning>

    <Tip>
      Most exchanges accept Polygon USDC deposits. Check your exchange's deposit page for the correct address and network.
    </Tip>
  </Step>

  <Step title="Enter Amount">
    Specify how much to withdraw:

    **Amount Limits:**

    * Minimum: \$5.00 USDC.e
    * Maximum: Your available balance
    * Funds are withdrawn as USDC.e on Polygon
  </Step>

  <Step title="Review and Confirm">
    Double-check the details:

    * Destination address
    * Amount being sent
    * Your remaining balance after withdrawal

    Click **Confirm Withdrawal** to proceed.

    <Check>
      Gasless withdrawals powered by Polymarket Relayer - no MATIC needed.
    </Check>
  </Step>

  <Step title="Track Withdrawal">
    After confirmation:

    1. Transaction submitted to relayer
    2. Processed on Polygon network
    3. Confirmation in \~30 seconds
    4. Transaction hash provided for tracking

    <Note>
      View transaction on PolygonScan using the transaction hash to verify delivery.
    </Note>
  </Step>
</Steps>

### Withdrawal History

View all past withdrawals from **Wallets** → **History**:

* Timestamp
* Destination address
* Amount sent
* Status (pending, completed, failed)
* Transaction hash

<Tip>
  Keep withdrawal history for tax records. Withdrawals to exchanges may be taxable events depending on your jurisdiction.
</Tip>

### Withdrawal Troubleshooting

<AccordionGroup>
  <Accordion title="Withdrawal not arriving">
    **If funds haven't arrived:**

    1. Check transaction hash on PolygonScan
    2. Verify transaction confirmed (should take 30 seconds)
    3. Check destination wallet/exchange:
       * Some exchanges require confirmations (5-20 minutes)
       * Verify you used correct network (Polygon not Ethereum mainnet)
    4. Contact destination wallet support if still missing

    <Warning>
      If you sent to wrong address or wrong network, Onsight cannot recover the funds. Always verify address and network before withdrawing.
    </Warning>
  </Accordion>

  <Accordion title="Insufficient balance error">
    **Causes:**

    * Funds locked in open positions (sell positions first)
    * Funds locked in pending limit orders (cancel orders first)
    * Tried to withdraw more than available balance
    * Balance not updated (click **↻ Refresh** on home screen)

    **Solution:** Free up funds by selling positions or cancelling orders before withdrawing.
  </Accordion>

  <Accordion title="Invalid address error">
    **Common issues:**

    * Address doesn't start with `0x`
    * Address wrong length (should be 42 characters including 0x)
    * Used Bitcoin or Solana address (not compatible)
    * Typo in address

    **Solution:** Copy address directly from destination wallet. Don't manually type addresses.
  </Accordion>
</AccordionGroup>

## Exporting Private Keys

You maintain full control of your wallets. Export private keys anytime to use with MetaMask, Phantom, or other wallets:

<Steps>
  <Step title="Access Export Feature">
    From the home screen:

    1. Go to **Wallets**
    2. Click **Export Keys**
  </Step>

  <Step title="Confirm Export" stepNumber={2}>
    Read the security warnings carefully:

    **Critical Security Warning:**

    * Anyone with your private key can access ALL your funds
    * Never share your key with anyone
    * Don't screenshot or save to cloud storage
    * Don't send via email or messages
    * Beware of fake support asking for keys

    Click **Yes, Reveal Key** to proceed.
  </Step>

  <Step title="Copy Private Key" stepNumber={3}>
    Your private key displays in a secure message:

    1. **Tap the key** to copy to clipboard
    2. Import immediately into your wallet app
    3. **Delete the message** after copying

    <Warning>
      **Delete this message immediately** after copying your key! Anyone with access to your Telegram can see it otherwise.
    </Warning>
  </Step>

  <Step title="Import to Wallet" stepNumber={4}>
    <Tabs>
      <Tab title="MetaMask">
        * Open MetaMask
        * Click account icon → Import Account
        * Paste private key
        * Your EOA wallet address should appear

        <Tip>
          For  Safe wallets, you will need to use the Gnosis Safe web interface (app.safe.global) with the imported EOA to access your funds.
        </Tip>
      </Tab>

      <Tab title="Phantom">
        * Open Phantom
        * Settings → Add / Connect Wallet
        * Import Private Key
        * Paste key
        * Your EOA wallet address should appear

        <Tip>
          For  Safe wallets, you will need to use the Gnosis Safe web interface (app.safe.global) with the imported EOA to access your funds.
        </Tip>
      </Tab>

      <Tab title="Other Wallets">
        Most wallets support private key import:

        * Look for "Import Account" or "Add Wallet"
        * Select "Private Key" method
        * Paste your key
        * Your EOA wallet address should appear

        <Tip>
          For  Safe wallets, you will need to use the Gnosis Safe web interface (app.safe.global) with the imported EOA to access your funds.
        </Tip>
      </Tab>
    </Tabs>
  </Step>
</Steps>

### When to Export Keys

<AccordionGroup>
  <Accordion title="Moving to Different Wallet">
    If you want to manage funds in MetaMask, Phantom, or other wallets:

    * Export once, import to new wallet
    * Continue using Onsight or new wallet
    * Same funds accessible from both
    * Your choice of interface

    <Check>
      You can use Onsight and other wallets simultaneously. They access the same on-chain funds.
    </Check>
  </Accordion>

  <Accordion title="Backup for Recovery">
    Save your keys securely in case you lose Telegram access:

    * Write on paper, store in safe
    * Use hardware wallet (Ledger, Trezor)
    * Use password manager with encryption
    * **Never** save to cloud without encryption

    <Warning>
      Don't rely on Onsight as your only access point. Export and backup your keys to recover funds if you lose Telegram access.
    </Warning>
  </Accordion>

  <Accordion title="Tax/Accounting Software">
    Some tax software requires wallet import for transaction history:

    * Export keys temporarily
    * Import to tax software
    * Generate tax reports
    * Remove keys from tax software after

    <Tip>
      Only use trusted, reputable tax software. Some tools may compromise your keys. Consider using public address view-only for tax reporting instead.
    </Tip>
  </Accordion>

  <Accordion title="Stop Using Onsight">
    If you want to stop using the bot but keep your funds:

    1. Export both Solana and Polygon keys
    2. Import to your preferred wallets
    3. Full access to all funds maintained
    4. Can optionally delete Onsight data

    Your funds are **never locked** to Onsight. You always have full control.
  </Accordion>
</AccordionGroup>

### Key Security Best Practices

<CardGroup cols="2">
  <Card title="Never Share Keys" icon="lock">
    No legitimate service will ever ask for your private keys. Anyone asking is a scammer.
  </Card>

  <Card title="Secure Storage" icon="shield-halved">
    Write keys on paper and store in a safe, or use a hardware wallet. Never save digitally unencrypted.
  </Card>

  <Card title="Delete After Export" icon="trash">
    Immediately delete the Telegram message after copying your key. Don't leave it in chat history.
  </Card>

  <Card title="Test Small First" icon="vial">
    Before importing keys to new wallet, test with small amount to ensure it works correctly.
  </Card>
</CardGroup>

<Warning>
  **Phishing Alert:** Scammers may impersonate Onsight support and ask for your keys. Real support will NEVER ask for private keys or seed phrases. Be extremely cautious of anyone requesting this information.
</Warning>
