R
RSTOCKS
Robinhood Chain

Documentation

Technical reference for the RSTOCKS reward engine.

Architecture

Next.js 16 app with viem/wagmi on Robinhood Chain (4663). Server-side scheduler claims Pons fees, swaps to HOOD, distributes ERC-20 transfers.

Environment Variables

DEV_WALLET_PRIVATE_KEY (0x hex), TOKEN_ADDRESS (optional), HOOD_TOKEN_ADDRESS, RHC_RPC_URL, AIRDROP_INTERVAL_MINUTES (default 5).

API Endpoints

GET /api/status — engine status. POST /api/cron/airdrop — trigger reward cycle. GET /api/holders — token holders. GET /api/stocks — live prices.

Scheduler

Local setInterval scheduler starts via instrumentation.ts on server boot. Client bootstrap provides backup. Fixes StockDrop's Vercel-only cron failure.

Holder Indexing

Blockscout API with 3 retries, then RPC Transfer event indexing as fallback.