A comprehensive crypto airdrop farming automation bot that helps you qualify for airdrops across multiple platforms including MegaETH testnet, Lighter DEX, and Polymarket.
- Wallet Management: Secure wallet creation and encrypted storage
- Multi-Platform Support:
- MegaETH testnet interaction automation
- Lighter DEX points farming and tracking
- Polymarket interaction tracking
- Activity Logging: Comprehensive logging to Notion API
- State Management: SQLite database for persistent state
- Automated Scheduling: Cron-based daily scheduler for hands-free operation
- Security: Encrypted private key storage with password protection
airdrop-farmer/
├── src/airdrop_farmer/
│ ├── config.py # Configuration management
│ ├── wallet_manager.py # Wallet creation and management
│ ├── database.py # SQLite state management
│ ├── notion_logger.py # Notion API integration
│ ├── farmer.py # Main farming orchestrator
│ ├── scheduler.py # Cron scheduler
│ ├── modules/
│ │ ├── megaeth.py # MegaETH testnet interactions
│ │ ├── lighter.py # Lighter DEX farming
│ │ └── polymarket.py # Polymarket tracking
│ └── utils/
│ ├── encryption.py # Encryption utilities
│ └── logger.py # Logging setup
├── main.py # CLI entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── README.md # This file
- Python 3.11 or higher
- Git
- A Notion account with API access
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/airdrop-farmer.git cd airdrop-farmer -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
cp .env.example .env
Edit
.envand fill in your credentials:MASTER_PASSWORD: Strong password for encrypting wallet private keysNOTION_API_KEY: Your Notion integration API keyNOTION_DATABASE_ID: ID of your Notion database for logging
-
Setup Notion Database:
Create a Notion database with the following properties:
- Wallet (Title)
- Platform (Select: MegaETH, Lighter, Polymarket, System)
- Activity (Text)
- Status (Select: success, failed, pending)
- Timestamp (Date)
- TX Hash (Text)
- Details (Text)
Get your Notion API key and database ID:
- Go to https://www.notion.so/my-integrations
- Create a new integration
- Copy the API key
- Share your database with the integration
- Copy the database ID from the URL
The bot provides several commands for different operations:
Create and store wallets securely:
python main.py setup --wallets 5This creates 5 wallets and stores them encrypted locally.
Execute farming activities once across all platforms:
python main.py runStart automated farming with recurring runs:
python main.py scheduleOptions:
--interval HOURS: Set custom interval (default: 24 hours)--no-immediate: Don't run immediately on start
Example:
python main.py schedule --interval 12Display farming statistics:
python main.py statsEdit .env to customize behavior:
# Required
MASTER_PASSWORD=your_strong_password
NOTION_API_KEY=secret_xxxxx
NOTION_DATABASE_ID=xxxxx
# Optional - Platform Configuration
MEGAETH_RPC_URL=https://rpc.megaeth.testnet
MEGAETH_CHAIN_ID=1234
LIGHTER_API_URL=https://api.lighter.xyz
LIGHTER_API_KEY=your_api_key
POLYMARKET_API_URL=https://api.polymarket.com
POLYMARKET_API_KEY=your_api_key
# Optional - Behavior
NUM_WALLETS=5
RUN_INTERVAL_HOURS=24
ENABLE_CRON=true
# Optional - Logging
LOG_LEVEL=INFO
LOG_FILE=./logs/airdrop_farmer.logThe bot performs the following activities on MegaETH testnet:
- Balance checks
- Self-transfers (common airdrop farming activity)
- Transaction confirmation tracking
- Testnet faucet requests
Note: The MegaETH airdrop deadline was February 1, 2026. The bot can still interact with the testnet for practice and future opportunities.
Tracks and farms points on Lighter DEX:
- Points balance tracking
- Trading activity monitoring
- Volume tracking
- Leaderboard position
Tracks interactions with Polymarket:
- Trade history
- Active positions
- Market participation
- Volume tracking
-
Install Railway CLI:
npm install -g @railway/cli
-
Login to Railway:
railway login
-
Initialize project:
railway init
-
Set environment variables:
railway variables set MASTER_PASSWORD="your_password" railway variables set NOTION_API_KEY="your_key" railway variables set NOTION_DATABASE_ID="your_db_id"
-
Deploy:
railway up
-
Configure cron job:
Add a cron job in Railway dashboard or use the built-in scheduler by setting:
railway variables set ENABLE_CRON=true
-
Create a new Web Service on Render
-
Connect your GitHub repository
-
Configure build and start commands:
- Build Command:
pip install -r requirements.txt - Start Command:
python main.py schedule
- Build Command:
-
Set environment variables in Render dashboard
-
Deploy
A Dockerfile can be created for containerized deployment:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py", "schedule"]Build and run:
docker build -t airdrop-farmer .
docker run -d --env-file .env airdrop-farmer- Never commit secrets: The
.gitignoreis configured to exclude sensitive files - Use strong master password: Required for wallet encryption
- Secure environment variables: Use platform-specific secret management
- Regular backups: Backup your encrypted wallet file (
data/wallets.enc) - Monitor logs: Check logs regularly for suspicious activity
Application logs are stored in:
logs/airdrop_farmer.log(detailed logs)- Console output (INFO level)
All activities are logged to your Notion database in real-time, providing:
- Activity timeline
- Success/failure tracking
- Transaction hashes
- Per-wallet statistics
SQLite database (data/airdrop_farmer.db) stores:
- Activity history
- Wallet states
- Platform statistics
- Scheduler run history
Query using any SQLite client or Python:
import sqlite3
conn = sqlite3.connect('data/airdrop_farmer.db')
cursor = conn.cursor()
cursor.execute("SELECT * FROM activity_log ORDER BY timestamp DESC LIMIT 10")
print(cursor.fetchall())-
"Configuration errors: MASTER_PASSWORD is required"
- Solution: Set
MASTER_PASSWORDin your.envfile
- Solution: Set
-
"Failed to connect to MegaETH testnet"
- Solution: Check RPC URL is correct and accessible
- The bot will continue with mock data for development
-
"Notion client not initialized"
- Solution: Verify
NOTION_API_KEYandNOTION_DATABASE_IDare set - Check database is shared with your Notion integration
- Solution: Verify
-
"No wallets found"
- Solution: Run
python main.py setupto create wallets first
- Solution: Run
Enable debug logging:
export LOG_LEVEL=DEBUG
python main.py runpytest tests/ -v- Modular design: Each platform has its own module
- Separation of concerns: Wallet, database, and logging are independent
- Extensible: Easy to add new platforms or features
- Create a new module in
src/airdrop_farmer/modules/ - Implement interaction methods
- Add to
farmer.pyorchestrator - Update configuration if needed
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This software is for educational purposes only. Use at your own risk. The authors are not responsible for:
- Lost funds
- Failed airdrop qualifications
- Platform bans or restrictions
- Any other consequences of using this software
Always review platform terms of service before automating interactions.
MIT License - See LICENSE file for details
For issues, questions, or contributions:
- Open an issue on GitHub
- Check the logs for error details
- Review the documentation
- Add more platforms (Arbitrum, Optimism, zkSync)
- Web dashboard for monitoring
- Telegram notifications
- Advanced trading strategies
- Multi-chain support
- Gas optimization
Built with Python, Web3.py, and Notion API
Happy farming!