Automated Python bot to manage and execute staged token sales for CHAR Coin private investors. Tracks real-time price, enforces sale stages, and performs on-chain swaps via Jupiter once conditions are met. Designed for post-launch supply control and fair distribution.
CharCoin Private Sale Bot
An automated Python bot to control and execute private sale token releases for CHAR Coin. Designed to enforce structured, price-based selling post-launch to protect token value and ensure fair distribution.
๐ Features
- Load investor wallet info, token allocation, and staking percentage
- Multi-stage sell plan with customizable target prices
- Sell in 20 fractions per stage for smoother release
- Real-time price tracking (CoinGecko or Pyth)
- On-chain swap execution via Jupiter Aggregator
- Dry-run simulation and live execution modes
- Secure handling of wallet private keys (encrypted JSON)
๐ Repository Structure
charcoin-private-sale-bot/
โโโ investors.json # Investor wallet + stage config
โโโ private_keys.json # Secure wallet key storage (never commit)
โโโ .env # API keys, Solana RPC
โโโ bot.py # Main bot logic
โโโ utils/
โ โโโ pricing.py # Price feed handlers
โ โโโ jupiter.py # Swap execution via Jupiter
โโโ logs/ # Execution logs
โ๏ธ Configuration
- investors.json
[
{
"wallet": "InakiZubizarreta.sol",
"total_tokens": 50400000,
"staking_percentage": 0.30,
"stages": [
{ "stagenumber": 1, "percentagetosell": 0.06, "targetprice_usd": 0.0024 },
{ "stagenumber": 2, "percentagetosell": 0.06, "targetprice_usd": 0.0030 }
]
}
]
- .env
RPC_URL=https://api.mainnet-beta.solana.com
COINGECKOAPIKEY=yourapikey
- private\_keys.json
{
"InakiZubizarreta.sol": "private-key-string-here"
}
๐งช Bot Modes
| Mode | Description | | --------- | ------------------------------------------------ | | dry-run | Simulates selling logic, no transactions sent | | live | Executes swaps on Jupiter when price targets hit |
๐ Example Log Output
โ
Stage 2 triggered at $0.0030 for InakiZubizarreta.sol
๐ Selling 30240 CHAR in 20 parts (~1512 per swap)
โ
Remaining CHAR: 201600
๐ Security Notice
- Never commit or upload
private_keys.jsonto any public repo. - Use per-investor wallets to limit exposure.
- Production deployments should encrypt and lock access to key files.
๐ Development Timeline
- โ Phase 1: Simulation logic + CLI alerts
- โ Phase 2: Real price feeds + Jupiter integration
- ๐ Phase 3: Admin dashboard / monitoring panel
๐ค Credits
Lead Developer: Nadir Ali Khan Bot Strategy & Oversight: Jorge Martinez Developed By: Team NAK (Blockchain | Automation | AI)
๐ License
MIT License โ intended for internal use by the CharCoin Foundation.