Skip to content

Repository files navigation

RAW

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


What it does

Every 30 minutes the protocol closes a window and runs a draw:

  1. Fees are claimed. Creator fees accrued on the token are pulled into the treasury wallet.
  2. Half becomes prize inventory. The rest is runway. The prize half accumulates as a reserve that carries forward whenever it is not fully spent.
  3. 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%.
  4. 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.
  5. 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.

Fairness

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.

Stack

  • 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

Development

Requires Node.js and Bun.

git clone <this-repository-url>
cd <repository-name>
bun install
bun run dev

Environment

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

No promises

The draw either runs and pays, or it does not — and either way the chain says which.

About

Real world assets powered by xStocks on Solana, without the boring part.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages