Autonomous AI trading agent on Base L2 that executes trades on Uniswap V3 using LLM sentiment analysis and on-chain data.
- Local LLM: Llama 3.2 via Ollama for news sentiment analysis
- Whale Watcher: Monitors USDC transfers >$100k on BaseScan
- Autonomous Trading: Direct Uniswap V3 integration with Web3.py
- Real-time Dashboard: React + Tailwind with live updates
Backend: Python, FastAPI, Web3.py, Ollama
Frontend: React, TypeScript, Vite, Wagmi, Reown AppKit
Network: Base Sepolia Testnet
cd backend
pip install fastapi uvicorn web3 requests python-dotenv ollama
# Create .env with:
# ALCHEMY_RPC_URL, PRIVATE_KEY, BASE_SCAN_API_KEY, CRYPTOPANIC_API_KEY
ollama pull llama3.2
uvicorn api_server:app --reloadcd ghostfund-web
npm install
npm run devngrok http 8000
# Update VITE_API_URL in frontend with ngrok URL- Start Ollama (
ollama serve) - Launch backend and frontend
- Connect wallet (MetaMask/WalletConnect)
- Click "Initialize Analysis"
- Review consensus score
- Execute trade
- 50% LLM sentiment from news
- 30% On-chain whale activity
- 20% Fear & Greed Index
Score >70 = Buy | <30 = Sell
Educational purposes only. Testnet only. Do not use real funds. Not financial advice.