Skip to content

Repository files navigation

Horocoin

Daily horoscopes as a competitive game on Solana. Users connect a wallet, pick their zodiac sign, and check in every day to read a horoscope delivered by a rotating mascot host. Check-ins earn EXP for their sign's faction; factions compete on a daily leaderboard, and the winners take the rewards pool.

Live frontend: horocoin-fullstack.vercel.app

The loop

  1. Check in daily — wallet-signature auth (nonce-based, no passwords), one check-in per day, streak multipliers for consistency.
  2. Read your horoscope — generated content, themed by whichever mascot is hosting.
  3. Earn faction EXP — every check-in scores for your zodiac faction; standings update live.
  4. Win the pool — winning factions split token rewards, distributed as merkle-tree claims.

Referrals, vouchers, and device fingerprinting (anti-sybil) round out the growth and integrity mechanics.

The buyback engine

The part that took real engineering: check-ins don't just mint points, they drive token demand.

  • Each check-in triggers a treasury buyback — a slice of treasury SOL is swapped to $HORO through the pump.fun bonding curve, with the swap instruction encoded directly against the on-chain program (no SDK); devnet-verified.
  • Below-minimum buybacks accumulate in the database and flush as batches through SQS, instead of spamming the chain with dust swaps.
  • Bought tokens land in a weekly rotating rewards wallet whose keys are AES-256-GCM encrypted at rest.
  • At week's end, rewards split 10% base / 90% competition pool and distribute via merkle-tree claims — batch insertion tested at 100K+ claimants in ~4 minutes.

Everything chain-facing runs on devnet and pump.fun's test token flow; nothing here moves mainnet funds.

Monorepo map

Directory What it is
horocoin-backend/ Express + TypeScript API: auth, check-in, EXP/standings, horoscope + mascot content, airdrop/buyback/rewards, referrals, vouchers, notifications, cron, Solana services
horocoin-frontend/ React 18 + Vite + Tailwind app with Solana wallet adapter (Phantom, Solflare, Coinbase) and i18n
horocoin-admin/ Admin console (React + Vite)
Hoshi Joshi/ Native iOS companion app (Swift) — see HOSHI_JOSHI_API_CONTRACT.md
live-dashboard/ Realtime standings dashboard
horocoin-me/, horocoin-me-waitlist/ Landing + waitlist
infra/ Terraform + Ansible provisioning
docs/ Design docs, launch checklist, implementation plans

Stack

Node.js + Express + TypeScript · PostgreSQL · Redis (caching + auth nonces) · Solana web3 · AWS SQS · React 18 + Vite · Swift (iOS) · Terraform + Ansible · Docker Compose · Jest + Supertest.

Quick start

docker compose up -d            # Postgres + Redis

cd horocoin-backend
cp .env.example .env            # DB, Redis, Solana RPC (devnet)
npm install
npm run dev                     # API on :3001

cd ../horocoin-frontend
npm install
npm run dev                     # Vite dev server

Backend tests: cd horocoin-backend && npm test (Jest + Supertest, no chain access needed).

Lineage

This codebase is the Western-zodiac original. Its sibling, 生肖幣 (Shengxiaobi), applies the same faction mechanics to the Chinese zodiac with a lunar-calendar almanac pipeline.

About

Daily horoscopes as a competitive game on Solana: zodiac factions, streaks, and a per-check-in treasury buyback engine with merkle-tree reward claims.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages