I built @solscanitbot — a Telegram trading bot for Solana with 44 commands, 12 background workers, and 21 data files. Here's the architecture.
Stack
- Pure Node.js (no framework, built-in https module)
- Solana Web3.js for blockchain interaction
- Jupiter V6 API for swaps
- Jito MEV protection for transaction bundling
- Helius RPC for fast reads
Core Features
- Buy/sell any Solana token
- Copy trading (mirror any wallet)
- DCA (dollar cost averaging)
- Limit orders
- Token sniping (new token launches)
- Portfolio tracking
- Price alerts
- Referral system (50% fee share)
- Premium tiers (Telegram Stars + SOL payment)
- Admin panel
Architecture
Single File Design
The entire bot is one 5,500-line JavaScript file. No TypeScript, no build step, no framework overhead. Just node bot.js and it runs.
Why? Because:
- Zero cold start time
- No dependency management nightmares
- Easy to deploy (copy one file)
- Simple to debug (everything is grep-able)
Data Storage
21 JSON files for user wallets, positions, alerts, orders, settings, referrals, etc. No database needed — JSON files are fast enough for 30 users.
Revenue Streams Built In
- 1% trading fee (0.5% premium)
- Premium subscriptions (Stars + SOL)
- Referral kickbacks
- Token promotion fees
- Volume bot fees
- P2P transfer fees
Background Workers
12 interval-based workers running:
- Price monitoring
- Order execution
- DCA scheduling
- Alert checking
- Copy trade mirroring
- Competition tracking
What I Learned
- Start with one file. Split later only if you need to.
- JSON files are fine for small user bases.
- Telegram API is excellent — inline keyboards, Stars payments, Mini Apps all work great.
- MEV protection matters on Solana. Jito bundles prevent sandwich attacks.
- Revenue from day one. Build monetization into the core, not as an afterthought.
Try It
- Bot: t.me/solscanitbot
- Tools: devtools-site-delta.vercel.app
- GitHub: github.com/TateLyman
Want a custom Telegram bot? I build them for $200-$1000. DM me or email lymantate2@gmail.com.
Top comments (0)