Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 174 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,181 @@
# fraudbuster-rug-pull-detector
# Has It Pumped? 📈

# TODO 7th May
![Has It Pumped Logo](/frontend/public/pumped.png)

A Solana token analysis tool that predicts whether tokens have already peaked or still have room to grow.

## Clean up
- Check if pre/post pump prediction is made from last data point
x - Clean up python routing into chunked files
x - Introduce testing into fast api and nextjs
x - image size ?
x - footer background color
x - loading flash ?
## 📋 Overview

**Has It Pumped?** is a web application that helps users analyze Solana tokens, particularly those from [pump.fun](https://pump.fun), to determine if they've already reached their peak price or if they still have potential for growth. The application:

## Hosting
x - dockerising ?
x - hosting fastapi and nextjs separately ?
- ?
- Analyzes Solana token price history
- Predicts if tokens are "pre-peak" or "post-peak"
- Visualizes token price charts
- Provides confidence levels for predictions
- Displays recent tokens and overall statistics

## Launching
- instagram clips
- video tour + analysis and scrape walk through
- message people, leaving comments on people
## 🏗️ Project Structure

The project is organized as a full-stack application:

```
analysis/ # Analysis for prediction model
hasItPumped/
├── frontend/ # Next.js frontend application
└── backend/ # FastAPI backend service
```

### Frontend (Next.js)

The frontend is built with Next.js 14, using React, TypeScript, and Tailwind CSS. It includes:

- Interactive token analysis interface
- Token price charts via GeckoTerminal integration
- Mobile-responsive design
- Recent token listings
- Statistics dashboard

### Backend (FastAPI)

The backend is built with FastAPI and provides:

- Token analysis endpoint `/analyze_token`
- Database statistics via `/stats`
- XGBoost machine learning model for peak prediction
- Integration with BitQuery API for Solana DEX data
- SQLite database for caching token data

## 🚀 Features

- **Token Analysis:** Enter a Solana token mint address and get instant analysis
- **Pre-Peak/Post-Peak Prediction:** ML-powered prediction on token price potential
- **Price Visualization:** Interactive price charts showing historical token performance
- **Token Stats:** Quick view of token metadata, price, and volume
- **Recent Tokens:** Browse recently analyzed tokens
- **Dashboard Statistics:** View overall stats on analyzed tokens

## 🛠️ Technical Stack

### Frontend
- **Framework:** Next.js 14
- **Language:** TypeScript
- **Styling:** Tailwind CSS, Shadcn/UI components
- **State Management:** React Query
- **Charts:** GeckoTerminal chart integration

### Backend
- **Framework:** FastAPI
- **Language:** Python 3.11+
- **Database:** SQLite
- **Machine Learning:** XGBoost
- **Data Processing:** Pandas
- **API Integration:** BitQuery for DEX data, GeckoTerminal for token metadata

## 💻 Installation and Setup

### Prerequisites
- Node.js 22+
- Python 3.11+
- Poetry (optional, for backend dependency management)

### Backend Setup
```bash
# Navigate to backend directory
cd hasItPumped/backend

# Install dependencies using Poetry
poetry install

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys (BitQuery API)

# Setup local dev DB (one off)
poetry run python src/solana_token_api/initialise_local_dev_db.py

# Run the backend service
poetry run python run.py
```

### Frontend Setup
```bash
# Navigate to frontend directory
cd hasItPumped/frontend

# Install dependencies
npm ci

# Set up environment variables
cp .env.example .env.local

# Run the development server
npm run dev
```

## 🔄 API Endpoints

### `/analyze_token` (POST)
Analyzes a Solana token and determines if it's pre-peak or post-peak.

Request:
```json
{
"mint_address": "SoLANATokenAddressHere..."
}
```

Response:
```json
{
"mint_address": "SoLANATokenAddressHere...",
"data": [...], // Historical OHLCV data
"is_pre_peak": true, // Prediction result
"confidence": 0.85, // Confidence score (0-1)
"days_of_data": 30 // Days of historical data
}
```

### `/stats` (GET)
Returns overall statistics about analyzed tokens.

Response:
```json
{
"total_tokens": 150,
"pre_peak_count": 45,
"post_peak_count": 105,
"recent_tokens": [...] // List of recently analyzed tokens
}
```

## 🔍 How It Works

1. The application fetches historical price data for Solana tokens using the BitQuery API
2. Data is processed and feature engineering is applied
3. An XGBoost model trained on historical token patterns makes the pre/post-peak prediction
4. Token metadata is fetched from GeckoTerminal
5. Results are presented in the UI with visualizations

## 📝 Note

This tool provides analysis based on historical patterns and should not be considered financial advice. The model is trained on historical data patterns of Solana tokens and makes predictions based on these patterns.

## 🚨 Limitations

- Only works with tokens that have sufficient historical data (minimum 3 days)
- Only analyzes Solana blockchain tokens
- Predictions are based on statistical patterns and are not guaranteed

## 📄 License

[MIT License](LICENSE)

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
1 change: 1 addition & 0 deletions hasItPumped/backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BITQUERY_ACCESS_TOKEN=""
Loading