A Telegram-first, gasless, sub-100ms sentiment-trading assistant that executes orders via Yellow Network state-channels (ERC-7824/Nitrolite) and settles final channel state on-chain for verifiable outcomes.
=======
29f24e545f96b1b734cdb23e53a1be619679437c
WinSurf delivers institutional-speed sentiment trading UX with end-to-end off-chain execution under one second and on-chain settlement on demand. It proves gasless, high-throughput trading by keeping order exchange off-chain in ERC-7824 channels and committing only the terminal state on-chain.
- Frontend: Next.js web dashboard for strategies, limits, latency/PnL telemetry
- Bot Service: Node.js/TypeScript Telegram bot for wallet connection and trade execution
- State Channels: ERC-7824/Nitrolite SDK for off-chain state management
- Settlement: On-chain adjudicator contracts for final state verification
- Sub-100ms off-chain trade execution
- Gasless trading via state channels
- Telegram bot interface with wallet integration
- Real-time sentiment-based triggers
- Risk management and policy gates
- Verifiable on-chain settlement
<<<<<<< HEAD
- Open SentimentVelocityBot on Telegram
- Start a chat and use the
/startcommand to begin - Follow the on-screen instructions to connect your wallet
-
Clone and install dependencies
git clone https://github.com/yourusername/SentimentVelocityBot.git cd SentimentVelocityBot npm install -
Setup Environment
# Copy example environment file cp .env.example .env.local # Edit .env.local with your configuration # Required: # - TELEGRAM_BOT_TOKEN # - PRIVATE_KEY # - RPC_URL
-
Run Development Servers
# Terminal 1: Start Next.js frontend npm run dev # The app will be available at http://localhost:3000
-
Set up Webhook (for production)
# Set webhook URL (replace with your public URL) npm run setup-webhook -- --url https://your-domain.com/api/webhook
| Variable | Description | Example |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Your Telegram bot token from @BotFather | 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 |
PRIVATE_KEY |
Ethereum wallet private key (for signing transactions) | 0x123...abc |
RPC_URL |
Ethereum JSON-RPC endpoint | https://mainnet.infura.io/v3/your-project-id |
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_WEBAPP_URL |
Public URL for webhook callbacks | http://localhost:3000 |
CHAIN_ID |
Ethereum chain ID | 1 (Mainnet) |
NODE_ENV |
Environment mode | development |
/start- Initialize the bot and show welcome message/connect- Connect your wallet/balance- Check your wallet balance/disconnect- Disconnect your wallet
/trade [pair] [side] [amount]- Execute a trade Example:/trade ETH/USD long 100/positions- View your open positions/history- View trade history/settings- Configure trading preferences
/status- Check bot status/help- Show help message
- Next.js 14 - React framework for the web interface
- TypeScript - Type-safe JavaScript
- Ethers.js - Ethereum wallet and blockchain interaction
- node-telegram-bot-api - Telegram Bot API implementation
- ERC-20/ERC-721 - Token standards support
- State Channels - Off-chain transaction processing
- Smart Contracts - On-chain settlement
- Vercel - Hosting and serverless functions
- Alchemy/Infura - Blockchain node providers
- MongoDB - Database for user data and trade history
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue or contact us at [email protected]
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
See CHANGELOG.md for version history and changes.
-
For Users:
- Simply open SentimentVelocityBot on Telegram
- Start a chat and use the
/startcommand to begin
-
For Developers:
# Clone the repository git clone https://github.com/0xrupamp26/SentimentVelocityBot.git cd SentimentVelocityBot # Install dependencies npm install # Set up environment variables cp .env.example .env # Edit .env with your configuration # Start development servers # Terminal 1: Frontend npm run dev:frontend # Terminal 2: Bot service npm run dev:bot
TELEGRAM_BOT_TOKEN: Your Telegram bot tokenPRIVATE_KEY: Wallet private key for signing transactionsCLEARNODE_URL: ClearNode WebSocket endpointRPC_URL: Ethereum RPC endpointADJUDICATOR_ADDRESS: ERC-7824 adjudicator contract address
- Start a chat with the Telegram bot
- Connect your wallet using
/connect - Set trading preferences with
/settings - Enable auto-trading with
/auto on - Monitor trades on the web dashboard
- ERC-7824: Chain-agnostic state-channel framework
- Nitrolite SDK: TypeScript client for state channel management
- ClearNode: High-throughput off-chain messaging broker
- Yellow Network: Layer-3 state-channel mesh and smart clearing
MIT
29f24e545f96b1b734cdb23e53a1be619679437c