Overview

Phantasm is a private Solana trading bot that executes trades through disposable wallets and pool mixing. Your deposit wallet never directly interacts with tokens on-chain.

⚠️ Important: This is a Telegram bot. No web interface for trading. All trades are executed through Telegram commands.

Setup

Prerequisites

  • Solana wallet with SOL
  • Telegram account
  • Node.js 18+ (for running the bot)

Installation

git clone [repository]
cd solanaprivtradingbot
npm install
cp .env.example .env
# Edit .env with your keys
npm start

Environment Variables

TELEGRAM_BOT_TOKEN: Your Telegram bot token from @BotFather

BUY_WALLET_PRIVATE_KEY: Private key for buy wallet

POOL_WALLET_PRIVATE_KEY: Private key for pool wallet

FEE_WALLET_PRIVATE_KEY: Private key for fee wallet

ENCRYPTION_KEY: Key for encrypting wallet private keys

Commands

/start

Initialize the bot and create your deposit wallet

/balance

Check your SOL balance

/deposit

Get your deposit wallet address

/buy

Buy tokens with privacy (e.g., /buy TokenMint 0.5)

/sell

Sell tokens with privacy (e.g., /sell TokenMint 1000000)

/sell_percent

Sell percentage of tokens (e.g., /sell_percent TokenMint 50)

/trades

View your trade history

/help

Show all available commands

Disposable Wallets

Every trade uses a fresh, randomly generated wallet that is never reused. This breaks the on-chain link between your deposit wallet and token purchases.

Buy Flow

  1. Generate new temporary wallet (Temp Wallet 1)
  2. Transfer SOL from deposit wallet to Temp Wallet 1
  3. Execute buy from Temp Wallet 1
  4. Keep tokens in Temp Wallet 1 (no transfer to permanent wallet)
  5. Recover remaining SOL to deposit wallet

Sell Flow

  1. Find Temp Wallet 1 holding tokens
  2. Generate new temporary wallet (Temp Wallet 2)
  3. Transfer tokens from Temp Wallet 1 to Temp Wallet 2
  4. Execute sell from Temp Wallet 2
  5. Transfer SOL to pool wallet

Pool Mixing

All sell proceeds flow through a shared pool wallet before returning to users. This creates natural mixing - it's difficult to trace which withdrawal corresponds to which sell.

How It Works

  • Temp Wallet 2 sends SOL to Pool Wallet after selling
  • Pool Wallet accumulates SOL from multiple users
  • Random delay (5-30 minutes) before withdrawal
  • Pool Wallet sends SOL to user's deposit wallet
  • Amount randomization (±0.5%) for additional privacy
ℹ️ Note: The pool wallet is a legitimate operational wallet, not a mixer. It provides natural mixing through normal bot operations.

Delayed Withdrawals

After selling tokens, SOL is not immediately returned to your deposit wallet. Instead, it's scheduled for withdrawal after a random 5-30 minute delay.

Why Delay?

  • Breaks timing correlation between sell and deposit
  • Prevents real-time tracking of your trades
  • Adds layer of temporal obfuscation

Withdrawal Process

  1. Sell completes, SOL sent to pool wallet
  2. Random delay calculated (5-30 minutes)
  3. Withdrawal scheduled in database
  4. Bot processes pending withdrawals periodically
  5. SOL transferred from pool to deposit wallet

Randomization

Multiple layers of randomization prevent pattern detection and fingerprinting.

Timing Randomization

  • Random 2-8 second delays between transactions
  • Prevents timing-based analysis
  • Breaks transaction pattern recognition

Amount Randomization

  • ±0.5% random variation on all amounts
  • Prevents amount-based fingerprinting
  • Example: 1.0 SOL becomes 0.9987 or 1.0043 SOL

Withdrawal Delay Randomization

  • Random 5-30 minute delays
  • Prevents predictable withdrawal patterns
  • Breaks temporal correlation

Architecture

System Components

  • Telegram Bot: User interface and command handling
  • Trade Executor: Privacy-enhanced trade execution
  • Wallet Manager: Secure wallet storage and encryption
  • Database: Trade history and temp wallet tracking
  • Pump.fun Integration: Token trading on Pump.fun

Privacy Flow Diagram

BUY:  Deposit → Temp1 → Trade → Keep in Temp1
SELL: Temp1 → Temp2 → Trade → Pool → (5-30min) → Deposit

Database Schema

  • Users: User accounts and deposit wallets
  • Trades: Trade history and status
  • Temp Wallets: Disposable wallets with token holdings
  • Pending Withdrawals: Scheduled pool → deposit transfers
  • System Wallets: Buy, pool, and fee wallets

Security

Private Key Encryption

All wallet private keys are encrypted using AES-256 encryption before storage in the database. The encryption key is stored in environment variables.

Best Practices

  • Never share your .env file
  • Use strong encryption keys
  • Keep your deposit wallet private
  • Start with small amounts for testing
  • Monitor your trades on Solscan

Limitations

  • All transactions are visible on-chain (just harder to link)
  • The bot operator knows all wallet mappings
  • Not complete anonymity, but strong privacy
  • Advanced chain analysis can still potentially trace transactions

FAQ

Is this completely anonymous?

No. This provides strong privacy (7/10), not complete anonymity. All transactions are visible on-chain, just harder to link to your identity.

How long do withdrawals take?

Withdrawals are delayed by 5-30 minutes after selling. This is intentional for privacy.

What happens if a trade fails?

The bot automatically attempts to recover SOL from temp wallets. Failed trades are logged in your trade history.

Can I sell tokens bought before the privacy update?

No. Tokens must be in temp wallets to sell. Only tokens bought with the new privacy system can be sold.

What are the fees?

0.5% fee on all trades. Plus standard Solana transaction fees (~0.000005 SOL per transaction).

Is this legal?

Privacy features are legal. Users are responsible for following local regulations and tax laws.

How do I check my token balance?

Use the /trades command to see your holdings. Tokens are stored in temp wallets, not your deposit wallet.

Can I withdraw tokens to my own wallet?

No. Tokens must be sold through the bot to maintain privacy. Direct token transfers would break the privacy model.