Background wallpaper
← BackDEVELOPMENT

AI VTuber Trading Battle

Dual AI VTubers engage in live trading battles driven by YouTube chat sentiment

Updated October 16, 20252 min read
Tech Stack:
PythonNode.jsMongoDBUniswap V3VTube StudioElevenLabs

Overview

Live streaming system where AI VTubers Rin & Biscuit compete in real-time cryptocurrency trading battles. YouTube chat sentiment drives blockchain trades on Uniswap V3, creating a gamified intersection of AI, streaming, and DeFi with 30-second batch processing and viewer loyalty momentum system.

Combines autonomous AI agents with real financial markets, featuring dual personalities (bullish Rin vs conservative Biscuit), synchronized VTube Studio animations, and comprehensive safety mechanisms including position limits, slippage protection, and emergency pause functionality.

$trading battle system

┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ YouTube │─────▶│ Sentiment │─────▶│ Trading │ │ Chat API │ │ Engine │ │ Engine │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │ │ │ ▼ ▼ ▼ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ Loyalty │ │ MongoDB │ │ Uniswap │ │ System │ │ History │ │ V3 API │ └──────────┘ └──────────┘ └──────────┘

sentiment/processBatch.py
def process_sentiment_batch(messages: List[ChatMessage]):
    # 1. Filter valid messages
    valid = filter_spam(messages)

    # 2. Calculate sentiment scores
    sentiments = [analyze_sentiment(msg) for msg in valid]

    # 3. Apply loyalty weights (viewers earn 1-3x influence)
    weighted = [
        sentiment * get_loyalty_score(msg.user)
        for sentiment, msg in zip(sentiments, valid)
    ]

    # 4. Aggregate for each VTuber
    rin_score = sum(w for w in weighted if positive(w))
    biscuit_score = sum(w for w in weighted if negative(w))

    # 5. Generate trades (runs every 30 seconds)
    if rin_score > threshold:
        execute_trade(rin, "buy", calculate_size(rin_score))
    if biscuit_score > threshold:
        execute_trade(biscuit, "sell", calculate_size(biscuit_score))

    # 6. Update VTube Studio avatar reactions
    sync_avatar_emotions(rin, biscuit)

Links:

  • GitHub Repository →
  • Start on testnet (Base Sepolia) before using real funds
  • Financial Risk Warning: Experimental software for entertainment/education only