Gambleandy (GANDY) is a Solana Token 2022 token with a built in lottery. Every transfer pays a 10% transfer fee. The collected fees are periodically given to a random token holder through an automated draw.
Website (offline since January 2026)
Testnet Token (coffee): pee1EpdW1XtxtmMHcLDrz2zfj8rCUHzzbUv7KNdu1jh
Mainnet Token (GANDY): 8n89JEaChfPKc5bPhURfYeSaYJDTyWmGWB937henCvzG
A set of small Node.js scripts runs on a schedule (cron) and passes state through JSON files in the data/ folder.
gettokenholders.jsfetches the current holders from the Helius API and writesdata/holders.jsonrandomHolder.jspicks a random winner and writesdata/selectedHolder.jsonWinnerPayout2.jssends the payout, then logs it todata/paidHolders.jsonand Supabasetelegram_winnNotify.jsposts the winner to Telegramsync_google-sheets.jsmirrors the payout history to a Google Sheet
Separately, fee.js withdraws the withheld Token 2022 transfer fees on its own schedule, and getlatestwinner.js prints the latest winner transaction.
scripts/lottery/is the live system that cron runsscripts/mainnet/is the SOL based payout for mainnet (work in progress)scripts/vrf/is an experimental verifiable random winner selectionscripts/token-operations/holds one time token setup scriptsscripts/utilities/holds helper scriptsconfig/crontab.backupis a reference copy of the installed crontabmessageTemplate.txtis the Telegram winner message template
- Install dependencies:
yarn install - Copy the environment template:
cp .env.example .env - Fill in your own values in
.env(Helius, Supabase, Telegram, and the path to your fee authority keypair) - Provide your Solana keypair files under
keys/and your Google service account atdata/service-account-key.json
All of these are ignored by git and are never committed. Node 20.19 or newer is required.
Run any stage directly, for example:
node scripts/lottery/gettokenholders.js
In production these run on a schedule. See config/crontab.backup.
- Devnet: active and automated, pays out in tokens
- Mainnet: token deployed, lottery migration still pending. The mainnet payout script is not production ready and the token to SOL swap is not yet implemented.
Secrets are loaded from a gitignored .env file. Private keypairs live in the gitignored keys/ folder. No credentials or private keys are committed to this repository. If you fork or redeploy, generate your own keys and credentials.
