AI-powered analysis of your on-chain activity, delivering personalized insights with a fun, meme-worthy twist. Get your 2024 Web3 Wrapped analysis by running the tool directly or tweeting your wallet address to the bot.
Web3 Wrapped is an AI-powered analytics tool that provides personalized insights into users' crypto trading activities. Similar to Spotify Wrapped, it analyzes on-chain data to create shareable summaries of your trading patterns, portfolio composition, and behavior - all delivered with humor and crypto culture references.
- Multi-Chain Support: Currently supports Base (EVM) and Solana chains
- Year-in-Review Analysis: Comprehensive analysis of your 2024 trading activity
- Trading Pattern Analysis: Evaluates your trading timing, frequency, and style
- PnL Tracking: Highlights your best and worst trades of the year
- Token Categories: Analyzes your token preferences using CoinGecko categories
- Shareable Results: Tweet-sized analysis (under 280 characters)
- Twitter Bot Integration: Get your analysis by tweeting your wallet address
The project uses a swarm of specialized AI agents that analyze different aspects of your wallet:
-
EVM Analyst Agent: Analyzes Base chain activity with a focus on:
- Trading patterns and timing
- Token preferences and choices
- PnL performance and notable trades
-
Solana Analyst Agent: Analyzes Solana chain activity with a focus on:
- SPL token trading behavior
- Meme token participation
- Notable trades and timing
Create a .env
file with the following:
# Required API Keys
MORALIS_API_KEY= # Required: For fetching on-chain data from Base and Solana
COINGECKO_API_KEY= # Required: For token categorization and price data
# API URLs (Optional - defaults provided)
MORALIS_BASE_URL=https://deep-index.moralis.io/api/v2.2
MORALIS_SOLANA_URL=https://solana-gateway.moralis.io
# SwarmZero Configuration
SWARMZERO_DATABASE_URL= # Required for production: PostgreSQL connection URL
SWARMZERO_LOG_LEVEL=INFO # Optional, defaults to INFO
# Twitter Bot Configuration (Optional)
TWITTER_API_KEY=
TWITTER_API_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_BEARER_TOKEN=
TWITTER_BOT_USERNAME=
TWITTER_ENABLE_STREAMING=false # Optional: Enable streaming mode if you have Pro access
# Logging Configuration
LOG_LEVEL=INFO # Optional, defaults to INFO
- Clone the repository
- Install Poetry if you haven't already:
curl -sSL https://install.python-poetry.org | python3 -
- Install dependencies:
poetry install
- Copy
.env.example
to.env
and add your API keys - Run the database migration:
python -m scripts.db.migrate_coins
This will migrate the coin dictionary from data/coin_dict.json
to the PostgreSQL database.
Ensure that the SWARMZERO_DATABASE_URL
in your .env
file is set to the correct database URL.
- Run the application:
# Interactive console mode
poetry run python main.py
# Twitter bot mode
poetry run python main.py --twitter-bot
The console mode allows you to analyze any wallet address directly:
- Run the application:
poetry run python main.py
- Enter a wallet address when prompted
- Get a personalized analysis of the wallet's 2024 activity
The bot responds to mentions with wallet analyses:
- Tweet your wallet address to the bot
- The bot will reply with your personalized Web3 Wrapped analysis
- Analysis includes trading patterns, notable trades, and token preferences
- Git repository with your code
- Render.com account
- API keys for Moralis and CoinGecko
- Twitter Developer Account (if using Twitter bot)
- PostgreSQL database
-
Database Setup:
- Create a new PostgreSQL database in Render
- Note the Internal Database URL
- Modify the URL:
- Change scheme from
postgresql
topostgresql+asyncpg
- Use this as
SWARMZERO_DATABASE_URL
in your env vars
- Change scheme from
-
Background Worker Setup:
- Create a new Background Worker service
- Connect to your repository
- Configure build settings:
- Build Command:
curl -sSL https://install.python-poetry.org | python3 - && poetry install
- Start Command:
poetry run python main.py --twitter-bot
- Build Command:
-
Environment Variables: Add all required environment variables to your worker:
MORALIS_API_KEY= COINGECKO_API_KEY= SWARMZERO_DATABASE_URL= LOG_LEVEL=INFO TWITTER_API_KEY= TWITTER_API_SECRET= TWITTER_ACCESS_TOKEN= TWITTER_ACCESS_TOKEN_SECRET= TWITTER_BEARER_TOKEN= TWITTER_BOT_USERNAME=
-
Database Migration:
- After deployment, run the coin dictionary migration:
python -m scripts.db.migrate_coins
This will populate the database with necessary coin data from
data/coin_dict.json
. -
Deploy:
- Click "Create Background Worker"
- Monitor the deployment logs
- Check worker status in Render dashboard
- Use Render's logging interface to monitor the worker
- Set up alerts for service interruptions
- Monitor API rate limits and usage