Project RUGGUARD is dedicated to building tools that help users assess the trustworthiness of token projects on the Solana Network. This repository contains a Twitter bot that analyzes account information upon request.
- Monitors Twitter for mentions containing the trigger phrase
@projectrugguard riddle me this - Analyzes the trustworthiness of accounts in two ways:
- When replying to a tweet: analyzes the original tweet's author
- When directly mentioned (not as a reply): analyzes the user who mentioned the bot
- Provides a detailed report including:
- Account age analysis
- Follower/following ratio analysis
- Bio content analysis
- Engagement patterns analysis
- Trusted connections verification
- Posts the analysis as a reply to the triggering comment
- Uses colorful, emoji-rich console logs for easy monitoring and debugging
The project follows a clean, modular architecture:
src/
├── config/ # Configuration settings
├── controllers/ # Bot controller logic
├── models/ # Data models
├── services/ # Service implementations
└── utils/ # Utility functions
- TwitterClient: Handles interactions with the Twitter API
- TrustedAccounts: Manages the list of trusted accounts for cross-verification
- AccountAnalyzer: Performs the account trustworthiness analysis
- BotController: Orchestrates the bot's monitoring and response functionality
- Node.js 18.x or higher
- npm, yarn, or pnpm
- Twitter developer account
- Twitter username and password
-
Clone the repository:
git clone https://github.com/Blockchain-Oracle/rugguard.git cd rugguard -
Install dependencies:
pnpm install
-
Create an environment file:
cp .env.example .env
-
Edit the
.envfile with your Twitter credentials:TWITTER_USERNAME=your_twitter_username TWITTER_PASSWORD=your_twitter_password TWITTER_EMAIL=your_twitter_email TWITTER_2FA_SECRET=your_2fa_secret_key # The following API keys are optional. The bot can function # without them, but they can provide more stable access. TWITTER_API_KEY=your_api_key TWITTER_API_KEY_SECRET=your_api_key_secret TWITTER_ACCESS_TOKEN=your_access_token TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret -
Build the project:
pnpm build
Start the bot in development mode:
pnpm devStart the bot in production mode:
pnpm start- Create a new Replit project from GitHub
- Set up environment variables in Replit's secrets tab
- In the Replit shell, run:
pnpm install pnpm build pnpm start
The bot verifies if the analyzed account is followed by trusted accounts from a predefined list. This list is loaded from trustedAccountList.json at startup.
An account is considered trustworthy if it's followed by at least 3 accounts from the trusted list.
There are two ways to use RUGGUARD:
To get a trustworthiness report for a specific Twitter user:
- Find a tweet from the user you want to analyze
- Reply to that tweet with the text
@projectrugguard riddle me this - The bot will reply with a comprehensive trustworthiness analysis of the original tweet's author
To get a trustworthiness report for your own account:
- Simply tweet or post
@projectrugguard riddle me this(not as a reply to anyone) - The bot will analyze your account and reply with a comprehensive trustworthiness report
To add new analysis criteria:
- Update the
AccountAnalyzerclass insrc/services/analyzer.ts - Add new metrics to the
AnalysisResultinterface - Update the report generation in the
generateReportmethod
Configuration settings can be modified in src/config/config.ts.
This project is licensed under the ISC License.
- Special thanks to the agent-twitter-client library for Twitter API integration
- The list of trusted accounts is based on community-vetted sources in the Solana ecosystem