Winner, 100x School & Superteam India Hackathon ($450 Prize) Recipient, Solana Foundation Audit Subsidy ($5,000 Grant)
"Ephemeral sentiment, permanently verifiable."
DugTrio is a Telegram-based AI agent that aggregates real-time crypto market social signals, analyzes them using Transformer models (RoBERTa), and anchors that intelligence onto the Story Protocol blockchain. It transforms fleeting market analysis into verifiable, ownable Intellectual Property (IP).
- Data Overload: Crypto moves too fast for humans to read every tweet or news article.
- Lack of Accountability: "Influencers" delete bearish tweets when the market pumps. There is no record of who predicted what.
- Ephemeral Insights: Valuable analysis is lost in the feed within minutes.
DugTrio continuously monitors high-velocity keywords (e.g., $SOL, $JUP) on X (Twitter). It filters out spam to capture the raw "voice of the market."
We use RoBERTa (cardiffnlp/twitter-roberta-base-sentiment), a transformer model fine-tuned on financial tweets, to understand context:
- Input: "This dip is tasty."
- Output:
Bullish (0.85)(Unlike simple tools which might see 'dip' as negative).
The Killer Feature: When a user requests to "Mint IP," DugTrio:
- Packages the analysis (Token, Score, Timestamp).
- Hashes the data into a unique fingerprint.
- Interacts with the Story Protocol IP Asset Registry (Sepolia Testnet).
- Result: A permanent, on-chain record proving this specific AI generated this insight at this time.
| Component | Technology | Purpose |
|---|---|---|
| Interface | python-telegram-bot |
User-facing command center. |
| Backend | FastAPI |
Logic handling & blockchain orchestration. |
| AI Engine | HuggingFace Transformers |
RoBERTa model for sentiment scoring. |
| Blockchain | Web3.py |
Interaction with Story Protocol (Sepolia). |
| Database | SQLite / PostgreSQL |
Caching tweets & user sessions. |
| Cloud | Render |
CI/CD & 24/7 Hosting. |
- Telegram Bot Interface.
- Twitter/X Scraper (
services/tracker.py). - RoBERTa Sentiment Model Integration (
services/analyzer.py).
- Connection to Story Protocol (Sepolia Testnet).
- Pipeline to mint Sentiment Reports as IP Assets.
- Dynamic Sentiment Analysis: Type
/sentiment <coin>to analyze any project instantly. - Deployment on Render.
- Multi-Agent Council: Three AI agents (Technical, Fundamental, Social) debate the token.
- Automated Trading: Connect Phantom Wallet to auto-execute trades if Score > 0.85.
- Fake PNL Detector: OCR feature to detect photoshopped profit screenshots.
- IP Marketplace: Frontend for users to trade their high-accuracy sentiment reports.
- More Commands: Add
/chart <coin>and/whale <coin>for deeper insights.
π‘ Have a better idea? We are open to discussing innovative features beyond this roadmap! If you have a cool concept for an AI agent or a new way to use Story Protocol, feel free to open an issue or a PR. We love creative contributions!
- Python 3.10+
- Telegram Bot Token
- X (Twitter) Developer Account (Essential for the scraper)
- Story Protocol Private Key (Sepolia)
- PostgreSQL Database (Recommended)
-
Clone the repo
git clone https://github.com/BEAST04289/DugTrio.git cd DugTrio -
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Create a
.envfile:TELEGRAM_BOT_TOKEN=your_token_here BEARER_TOKEN=your_twitter_api_bearer_token PRIVATE_KEY=your_wallet_private_key RPC_URL=https://ethereum-sepolia-rpc.publicnode.com API_BASE_URL=http://127.0.0.1:8000 DATABASE_URL=postgresql://user:password@localhost/dugtrio_db
The Free Tier of the X API only allows 100 tweets per month.
- Default Setting: We have set the scraper to pull only 10 tweets per run to prevent you from burning your quota instantly.
- How to Change: If you have a paid plan (Basic/Pro), go to
services/tracker.pyand changemax_results=10to50or100.
Since DugTrio uses real-time data, you need to run the backend and the bot. The data engine now runs automatically when you use the bot!
Terminal 1: The Backend API
uvicorn api.main:app --reloadTerminal 2: The Telegram Bot
python -m bot.bot(Optional) Terminal 3: Manual Data Engine Only needed if you want to force a bulk update without using the bot.
python -m services.tracker
python -m services.analyzerCause: The database is empty or the X API limit (100 tweets/month) has been reached. Fix:
- Check your API Quota: Log in to the Twitter Developer Portal and ensure you haven't used all 100 tweets.
- Wait: If you have quota, just click the button in the bot again. It now automatically tries to fetch data.
- Check Logs: Look at the "Terminal 1" output. If it says "429 Too Many Requests", you are out of quota.
To use the "Mint IP" feature, you need a wallet on the Sepolia Testnet.
- Install MetaMask.
- Enable "Show Test Networks" in settings.
- Copy your Private Key (Settings -> Security -> Show Private Key).
- Paste it into your
.envfile asPRIVATE_KEY. - Get free Sepolia ETH from a faucet (e.g., Google "Sepolia Faucet") to pay for gas.
We included a utility script to check your database stats:
python -m scripts.check_statsCause: Missing PRIVATE_KEY or RPC_URL in .env. Fix: The bot will still work without blockchain features, but IP minting will fail. Ensure your .env is set up correctly if you want to test minting.
Run these from a separate terminal to verify the backend is up and the update flow works.
- Check API root (should return service status):
curl.exe http://127.0.0.1:8000/- Get current sentiment summaries:
curl.exe http://127.0.0.1:8000/sentiment- Trigger an on-demand scrape + analyze for a project (example
solana):
curl.exe -X POST http://127.0.0.1:8000/update/solanaPowerShell note: the built-in curl is an alias for Invoke-WebRequest which may prompt before parsing web content. Use curl.exe or Invoke-RestMethod -Uri 'http://127.0.0.1:8000/' to avoid the interactive prompt.
If these commands return expected JSON (e.g., {"status":"online","service":"DugTrio Backend"} for the root), the backend is running and the bot should be able to trigger on-demand updates.