# Galaxy King Dog — Whitepaper

![Robin, an orange cat archer in a green hood, draws a cyan arrow above the rain-soaked city.](https://galaxykingdogs.netlify.app/assets/site/robin-whitepaper-hero-v3.png)

## Play

- [Game Jolt — v0.8.1](https://gamejolt.com/games/galaxy-king-dog/1084669) — free arcade with local browser records only. Online score submission is paused. Free; no wallet or entry fee.
- [Web desktop arcade — Robin v6](https://galaxykingdogs.netlify.app/galaxian.html?skin=robin-cat-v6&voice=1) — keyboard controls and local best scores. Free; no wallet or entry fee.
- [Web mobile arcade — Mobile 6](https://galaxykingdogs.netlify.app/mobile/?v=mobile-6) — circular joystick, red FIRE button, expanded view and local best scores. Free; no wallet or entry fee. In Chrome, open the menu and choose Add to Home screen.
- [Robinhood Testnet — Robin v6](https://galaxykingdogs.netlify.app/robinhood.html?skin=robin-cat-v6&voice=1) — EVM wallet, test ETH entry + gas and on-chain test scores.

[Find controls for your device](https://galaxykingdogs.netlify.app/play/). If your phone still shows an older version, [update the mobile arcade](https://galaxykingdogs.netlify.app/mobile-refresh/).

## Robin / Robin: Dead Grid

*A fictional prologue.*

The city gave points for everything except fixing it.

Under neon towers, delivery dogs chased green arrows for streaks and badges. The arrows led in circles. Across the canal, a clinic had been dark for three nights.

“Lovely dashboard,” Robin said. “Shame about the lights.”

The cat climbed an abandoned rail gantry with her bow. For six evenings, she practiced sending a thread between two broken pylons. Arrows drowned. Her paws blistered. She learned to loosen her grip and wait out the passing trains.

A terrier mechanic found a working circuit. Two couriers brought cable instead of chasing another bonus.

On the seventh evening, Robin’s arrow crossed the water. The couriers hauled the cable along her thread; the mechanic made the connection.

The clinic lit up.

Their screens offered nothing. From the opposite window, a nurse flashed a lamp twice.

Robin raised two fingers, then passed the bow to the terrier.

![Robin and canine companions beside a rain-soaked canal, with a cyan line reaching a warmly lit clinic.](https://galaxykingdogs.netlify.app/assets/site/robin-dead-grid-v3.png)

*Dead Grid / A light across the canal. A fictional world.*

## Current release

The current Game Jolt v0.8.1 keeps records in your local browser only. Online score submission is paused. The web desktop and mobile editions also save your best scores locally on each device. All free arcade modes need no wallet or entry fee.

Robinhood Testnet is a prototype with test ETH entry payments and verifier-approved on-chain scores. Token farming, NFT rewards and player prize payouts are not live. Mainnet is disabled.

The technical paper below describes the Solana design and repository implementation. Its economy and Solana-specific security guarantees do not describe the current Robinhood prototype. The Testnet contract remains owner-controlled, including an owner withdrawal function.

[Current Testnet contract](https://explorer.testnet.chain.robinhood.com/address/0xC9a5e242887c3211c617FbeD2ba533B8195E712e)

## Original technical whitepaper — v1.8

Version 1.8 · reflects the **implemented** system. For the frozen numeric constants see
[WHITEPAPER_IMPLEMENTATION_LOCK_V1_7.md](https://galaxykingdogs.netlify.app/assets/site/papers/WHITEPAPER_IMPLEMENTATION_LOCK_V1_7.html); per-subsystem
details are linked throughout.

## 1. Overview

Galaxy King Dog is a skill-based arcade space shooter with a non-custodial, rule-enforced economy on
Solana. Players pay a small SOL entry fee, compete for high scores across 33 seasons, farm the
`$420POP` SPL token under a Bitcoin-style halving schedule, and win SOL payouts and NFTs. Every
recorded score and payout is constrained by on-chain rules — there is no admin withdrawal, no hidden
minting, and no discretionary reward.

## 2. Gameplay & determinism

The engine runs at a fixed timestep with seeded RNG (no `Math.random`). Each run records per-frame
inputs, frame deltas, and the seed, and produces a Proof-of-Play package containing:

- a **replay hash** (inputs + seed + checkpoints),
- a **version hash** (the exact game build/ruleset),
- a **run hash** binding player, season, fee, ticket and result.

This makes a run reproducible and its identity tamper-evident.

## 3. Trust model (as implemented)

Gameplay is client-side and skill-based; trust in the *score* is established in two layers:

1. **Off-chain authority — live anti-cheat ledger.** The verifier validates each scoring event as it
   occurs (challenge–response, hash-chained events, rate/plausibility limits) and produces the
   authoritative `accepted_score`. The client never simply asserts a score.
2. **On-chain enforcement — verifier signature.** The verifier signs a canonical, score-bound
   message; `submit_verified_run` verifies that ed25519 signature against the trusted verifier key
   using the Solana Ed25519 precompile. Only a verifier-signed score can be recorded on-chain.

See [ANTI_CHEAT_SCORE.md](https://galaxykingdogs.netlify.app/assets/site/papers/ANTI_CHEAT_SCORE.html). A fully independent, bit-for-bit deterministic replay
gate is a **future hardening** (the current resimulation core is schema-2 hash/checkpoint, not a 1:1
replay).

## 4. Entry fee — weekly $0.10 peg

Entry costs a target of **$0.10** in SOL. The fee is stored in lamports and **re-pegged weekly** by a
permissionless crank that reads a Pyth SOL/USD feed (`refresh_fee`), so it tracks the dollar target
as SOL moves. A 2/3 multisig may also override the fee and pause the program, but **cannot withdraw
pool funds** — there is no such instruction. See [FEE_GOVERNANCE.md](https://galaxykingdogs.netlify.app/assets/site/papers/FEE_GOVERNANCE.html).

## 5. Game Pool & checkpoint payouts

All entry fees flow into a program-owned **Game Pool PDA** (`deposit_entry_fee`). Funds leave only
through permissionless, one-time checkpoints, each splitting the distributable balance by locked
rules:

| Checkpoint | Split |
|---|---|
| Farm season end | 70% retained · 20% champion · 10% creator payout |
| World record break | 70% retained · 20% breaker · 10% creator payout (every break) |
| Human season end (S32) | 30% carried to Chaos · 40% human champion · 30% creator payout |
| Chaos season end (S33) | 67% chaos champion · 33% creator payout |

Every **creator payout** is auto-split **49% creator / 51% Charity Pool**, and **20% of the charity
share recycles back** into the Game Pool. See [POOL_MECHANISM.md](https://galaxykingdogs.netlify.app/assets/site/papers/POOL_MECHANISM.html).

## 6. Token mining — `$420POP`

`$420POP` (9 decimals) is minted by a program PDA; no human holds mint authority. Emission follows a
Bitcoin-style halving: 33 seasons, ~2.1B tokens across the 32 human seasons and a fixed 300,000 cap
for the Chaos season. Each qualifying run mints a per-season block reward, exact to the season cap.

Difficulty is **proof-of-work-like**: the minimum score required to mint rises with the already-minted
supply (Mode B) and is checked **at mint time** — a run that beat the base minimum but not the current
difficulty can no longer mine. The final human token requires a new world record. See
[TOKEN_MINING.md](https://galaxykingdogs.netlify.app/assets/site/papers/TOKEN_MINING.html).

## 7. NFTs & marked tokens

True Metaplex NFTs reward milestones — first player (`baby_metatron`), season champion, record
breaker, human champion (`human_metatron`), and chaos champion
(`final_galaxy_metatron_defender`). Each award is single-issue (one-time PDA) and minted by the
program PDA. See [NFT_AWARDS.md](https://galaxykingdogs.netlify.app/assets/site/papers/NFT_AWARDS.html).

## 8. Charity Pool & governance

The Charity Pool accumulates the charity share of creator payouts. Its destination is decided by
**token-weighted governance** at two gates only — end of human emission and end of Chaos. Eligibility
requires having farmed ≥ 1 `$420POP`; quorum is 10,000 weighted votes; duration is 99 days; a tie
triggers a re-vote; below quorum the funds remain in the Charity Pool. The winner must be a
whitelisted, verified charity operator. See [CHARITY_GOVERNANCE.md](https://galaxykingdogs.netlify.app/assets/site/papers/CHARITY_GOVERNANCE.html).

## 9. Security & decentralization

- **No withdrawal path**; pool/charity moves are rule-enforced and keep PDAs rent-exempt.
- **Value-conserving splits** and exact-cap minting (unit-tested).
- Known centralization to harden before mainnet: the **admin authority** is a single key (it cannot
  withdraw funds but gates season closing, the verifier key, the whitelist and pause) and the
  **verifier key** is a trusted oracle. Recommended: multisig admin, HSM-held verifier key, a
  governance balance snapshot, and an **independent audit**. See [SECURITY_NOTES.md](https://galaxykingdogs.netlify.app/assets/site/papers/SECURITY_NOTES.html).

## 10. Status

Implemented and tested (off-chain): the full program (27 instructions), the verifier signing path,
and the front-end wiring (entry fee → Pool PDA, on-chain top-3 leaderboard). Pending: program
deployment and the operational hardening above. See [DEPLOY.md](https://galaxykingdogs.netlify.app/assets/site/papers/DEPLOY.html).
