A Solana token whose creator fees buy real tokenized equities powered by xStocks and give them away, every half hour, to a holder chosen at random.
rawpacks.app · @rawpacksapp
Every 30 minutes the protocol closes a window and runs a draw:
- Fees are claimed. Creator fees accrued on the token are pulled into the treasury wallet.
- Half becomes prize inventory. The rest is runway. The prize half accumulates as a reserve that carries forward whenever it is not fully spent.
- An asset is drawn. One tokenized equity is picked from the universe. Its rarity band decides how much of the reserve is spent — 25%, 40%, 65% or 100%.
- A holder is drawn. Every wallet holding the token is entered with weight equal to its balance. The selection runs inside the database over the full entry set, so it is the same cost with 50 holders or 50,000.
- The prize is bought and sent. The treasury swaps into the equity and transfers it to the winner. Every step lands on-chain with a Solscan link.
Each window commits to a seed hash before it opens and reveals the seed at close. The winner is a deterministic function of the revealed seed and the weighted entry list, both of which are public after the draw, so any result can be recomputed independently.
- TanStack Start — SSR app, server functions and public API routes
- React + TypeScript + Tailwind CSS
- Cloud (Postgres) — draws, entries, payouts, treasury ledger, job locks
- Solana — holder snapshots, swaps and transfers straight from an RPC node
Requires Node.js and Bun.
git clone <this-repository-url>
cd <repository-name>
bun install
bun run dev| Variable | Purpose |
|---|---|
RAW_MINT |
The token mint holder snapshots are taken from |
SOLANA_RPC_URL |
RPC endpoint for reads, swaps and transfers |
TREASURY_PRIVATE_KEY |
Treasury wallet signer |
TREASURY_HOOK_SECRET |
Shared secret guarding the internal test endpoints |
The draw either runs and pays, or it does not — and either way the chain says which.