๐Ÿ“š Monad Adventures Docs

Product + technical reference for gameplay, tokens, persistence, APIs, and security controls.

โš”๏ธ 1) Core Gameplay

  • ๐Ÿ—บ๏ธ 3 dungeons: Training Field, Mad Wizard, Grand Colosseum.
  • ๐Ÿ Runs are up to 10 levels with decreasing win odds as level increases.
  • ๐Ÿง™ Character progression is unlimited and increases from boss kills.
  • ๐Ÿงฉ Item progression is level-based; equipped items gain EXP from boss kills.
  • ๐Ÿ’จ Cash out lets players escape early and claim accumulated SPIKES.

๐Ÿ’ฐ 2) Currencies & Economy

  • ๐Ÿช™ Primary in-game currency is SPIKES.
  • ๐ŸŽŸ๏ธ Mad Wizard + Grand Colosseum require SPIKES entry fees.
  • โšก Training Field is free entry, but consumes daily energy.
  • ๐ŸŽ Spike Loot Box gives 500 SPIKES for 2 USDC (fixed reward).
  • ๐Ÿ›’ Items can be sold for a flat 5 SPIKES each.
  • ๐Ÿงฏ Jackpot mechanics are disabled for now.

๐Ÿฎ 3) MON Boss Loot

  • ๐ŸŽฒ MON loot appearance chance is 10% per boss level.
  • ๐Ÿ† If MON appears and you defeat the boss, a win roll determines reward.
  • ๐Ÿ’ธ Reward is 5 MON and shown in the victory overlay with the MON icon.
  • ๐Ÿงพ Claim IDs prevent duplicate payouts for the same boss clear.
  • ๐Ÿ”ง MON payout mode can be independent from SPIKES settlement mode.

๐Ÿ”‹ 4) Daily Energy

  • ๐Ÿ“ˆ Daily cap is 100 energy; Training Field costs 10 per entry.
  • ๐Ÿ•› Energy resets by day key and is enforced server-side (UTC day).
  • ๐Ÿ—๏ธ Mad Wizard + Grand Colosseum do not consume energy.
  • ๐Ÿ“Š UI shows a full-width energy bar on the Training Field card.

๐ŸŽ’ 5) Item Loot & Inventory

  • ๐Ÿงช Two-step loot: appearance roll, then win roll on boss victory.
  • ๐Ÿ€ Current settings: 25% appear, 80% win if you beat the boss.
  • ๐Ÿงท Drops go to wallet inventory and can be equipped by slot.
  • โ™ป๏ธ Selling an equipped item auto-unequips and recalculates boosts.
  • ๐Ÿ—„๏ธ Inventory is identity-scoped and persisted in Postgres.

๐Ÿ“ˆ 6) Reward Scaling

  • ๐Ÿ“Š SPIKES level rewards scale up as win odds decrease.
  • ๐Ÿงฎ Uses base dungeon reward + level win chance to scale payout.
  • ๐ŸŽฏ Higher risk levels pay more to match difficulty.

๐Ÿงฑ 7) Persistence (Postgres)

  • ๐Ÿ—ƒ๏ธ State is persisted in PostgreSQL with normalized tables.
  • ๐Ÿงพ Tables: players, sessions, wallet_items, used_payment_tx_hashes, jackpots, chat_messages.
  • โš™๏ธ Server keeps in-memory state and flushes to Postgres.
  • ๐Ÿงณ Legacy migration supports old JSON / older DB formats.

๐Ÿ” 8) Auth & Identity

  • ๐Ÿงพ Onchain mode uses signed wallet challenge auth.
  • ๐Ÿชช Mock mode uses identity keys (wallet or guest) passed to APIs.
  • ๐Ÿงท Ownership checks protect player/session state mutations.

๐Ÿš€ 9) Deployment

  • ๐ŸŒ Frontend: Vercel (Next.js).
  • ๐Ÿ›ค๏ธ Backend: Railway (Node + Postgres plugin).
  • ๐Ÿช™ SPIKES settlement: mock or onchain via escrow.
  • ๐Ÿฎ MON payout: independent via MON_REWARD_MODE (mock/onchain).

๐Ÿ›ก๏ธ 10) Security Controls

  • ๐Ÿšฆ Global rate limiting with bounded bucket map.
  • ๐ŸงŠ No-store API headers + basic hardening headers.
  • ๐Ÿ” Replay protection for token payment tx hashes.
  • ๐Ÿงพ Duplicate-claim prevention for MON payouts.
  • ๐Ÿ’ฌ Chat is capped to latest 20 messages (client load control).
  • ๐Ÿง Chat + player creation require identity in mock mode.

๐Ÿงฐ 11) API Overview

  • ๐Ÿ‘ค Players: create, resume, state, inventory, sell item.
  • ๐Ÿ† Ranking: global character leaderboard (level + EXP ordering).
  • ๐Ÿ—บ๏ธ Dungeons: list, enter.
  • ๐Ÿงจ Sessions: equip, attack, cashout, claim.
  • ๐ŸŽ Tokens: buy (mock), open loot box.
  • ๐Ÿ’ฌ Chat: list latest, post message.

โœจ Tip: Docs are meant to be player-friendly; dev details live in the backend README.