Hold $ALCH, Earn $GOLD - Fully automated reward distribution on Solana
π Website β’ π Docs β’ π¬ Community
The Alchemy Token Distributor is an automated system that rewards $ALCH token holders with $GOLD tokens. The system continuously:
- Collects trading fees from the ALCH/SOL liquidity pool
- Converts SOL to GOLD using Jupiter aggregator for best rates
- Distributes GOLD proportionally to all ALCH holders based on their holdings
All operations run automatically every few minutes, ensuring consistent rewards for holders.
| Token | Contract Address | Type |
|---|---|---|
| $ALCH (Snapshot Token) | WXsX5HSoVquYRGuJXJrCSogT1M6nZiPRrfZhQsPcXAU |
Token-2022 Token |
| $GOLD (Reward Token) | GoLDppdjB1vDTPSGxyMJFqdnj134yH6Prg9eqsGDiw6A |
Reward Token |
- β‘ Fully Automated - Runs continuously with PM2 process management
- π Proportional Rewards - Distribution based on ALCH holdings percentage
- π Optimal Swaps - Jupiter aggregator finds best SOLβGOLD routes
- π‘οΈ Pool Filtering - Automatically excludes AMM/DEX addresses
- π Batch Processing - Efficient parallel transaction execution
- π Secure - No private keys in code, environment-based configuration
- Node.js 18+ and npm
- Solana wallet keypairs (JSON format)
- RPC endpoint (Helius, Alchemy, or other)
# Clone the repository
git clone <repository-url>
cd alchemy-token-distributor
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Add your keypairs
# - keypair.json (for pool fee collection)
# - keypair_distro.json (for token distribution)Create a .env file:
RPC_ENDPOINT=https://your-rpc-endpoint.com
KEYPAIR_PATH=keypair.json
KEYPAIR_DISTRO_PATH=keypair_distro.json# Collect pool fees (run every 2 minutes)
npm run collect-fees
# Swap SOL to GOLD (run every 2 minutes)
npm run swap
# Distribute GOLD to ALCH holders (run every 5 minutes)
npm run distributeFor continuous automated operation:
# Install PM2 globally
npm install -g pm2
# Start all processes
pm2 start ecosystem.config.js
# Monitor processes
pm2 monit
# View logs
pm2 logs
# Stop all processes
pm2 stop allThe ecosystem.config.js schedules:
- Fee Collection: Every 2 minutes
- SOLβGOLD Swap: Every 2 minutes
- GOLD Distribution: Every 5 minutes
alchemy-token-distributor/
βββ src/
β βββ collect-fees.ts # Collect pool trading fees
β βββ swap-sol-to-gold.ts # Swap SOL to GOLD via Jupiter
β βββ distribute-tokens.ts # Distribute GOLD to ALCH holders
βββ ecosystem.config.js # PM2 configuration
βββ .env.example # Environment template
βββ README.md
// Collects trading fees from ALCH/SOL pool on Meteora
// Fees are claimed to the pool owner wallet
collectPoolFees()// Swaps accumulated SOL to GOLD tokens
// Keeps 1 SOL reserve for transaction fees
// Uses Jupiter for optimal routing
swapSOLToGold()// Takes snapshot of all ALCH holders
// Filters out pools and AMM addresses
// Distributes GOLD proportionally to holdings
distributeToHolders()- Snapshot: System scans all ALCH token accounts on-chain
- Filter: Removes AMM pools, DEX programs, and blacklisted addresses
- Calculate: Determines each holder's percentage of total supply
- Distribute: Sends proportional GOLD rewards to all eligible holders
Example: If you hold 5% of circulating ALCH, you receive 5% of each GOLD distribution.
# Build TypeScript
npm run build
# Run individual scripts
npm run collect-fees
npm run swap
npm run distribute
# Run with ts-node (development)
npx ts-node src/collect-fees.ts
npx ts-node src/swap-sol-to-gold.ts
npx ts-node src/distribute-tokens.ts- β Never commit keypair files to version control
- β Use environment variables for sensitive data
- β Keep RPC endpoints private
- β Regularly rotate wallet keys
- β Monitor transaction logs for anomalies
- β Use dedicated wallets for automated operations
| Variable | Description | Required |
|---|---|---|
RPC_ENDPOINT |
Solana RPC URL | Yes |
KEYPAIR_PATH |
Path to fee collector keypair | Yes |
KEYPAIR_DISTRO_PATH |
Path to distributor keypair | Yes |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This software is provided "as is" without warranty. Use at your own risk. Always test thoroughly on devnet before mainnet deployment.
- Solana Explorer: View ALCH Token
- Jupiter: Swap Interface
- Meteora: Pool Dashboard
Built with β€οΈ for the Alchemy community
Hold $ALCH β’ Earn $GOLD β’ Prosper Together
