Moonshot & Client-Side Autonomy

How Moonshot automates the game while maintaining the same provable fairness as Cash or Crash.

Feb 4

Overview

Moonshot is a fast-paced, automated version of Cash or Crash. While the gameplay feels different—you choose a "Mode" (like Safe or Degen) and watch the game play itself—the underlying game engine, smart contracts, and provable fairness guarantees are identical.

The key difference lies in who makes the decisions:

  • Cash or Crash: You manually click each tile.
  • Moonshot: Your client (browser) automatically picks tiles for you based on a random selector.

Because the game logic and the selection logic are completely separated, the fairness of the game remains mathematically provable.


Shared DNA: The Game Engine

  1. The Grid is Pre-Determined: Just like in Cash or Crash, the server generates a game seed and commits to it (via a hash) before you make any moves.
  2. Rows & Tiles: The game consists of rows with winning spots and crashing spots.
  3. ZK Proofs: The randomness validity of the game is guaranteed by the same Zero-Knowledge Proof system.

Whether you click the button yourself or let a script click it for you, the "minefield" you are walking through is generated and secured in the exact same way.


Game Modes & Probability

Moonshot simplifies the Cash or Crash experience into distinct Modes (Safe, Greed, FOMO, Degen).

Think of each mode as setting the "width" of the board. In Cash or Crash, you might encounter varying difficulties. In Moonshot, every row has the exact same number of tiles, giving you a consistent probability of success at every step.

One Mine Rule

Regardless of the mode you choose, there is always exactly 1 mine per row. The difficulty changes only because the number of safe spots decreases.

ModeTotal TilesSafe TilesWin Chance per Step
Safe65~83%
Greed5480%
FOMO4375%
Degen32~66%

Just like the main game, the location of the mine for every row is fixed before the game starts. When you see the gameSeedHash at the beginning, the fate of every row is already sealed. Your chosen mode simply determines how many "wrong answers" exist compared to "right answers," but the fairness and pre-determination remain absolute.


The Difference: Client-Side Randomness

In Moonshot, we've moved the decision-making process from your mouse hand to a Client-Side Random Selector.

When you click "Start" in Moonshot:

  1. Your browser calculates which tile to pick next using a randomization function (by default, a standard Math.random()).
  2. It sends that choice to the server.
  3. The server checks if that tile is safe or not.

Crucially, this selection happens entirely on your device. The server does not know which tile your client will pick until after the choice is made and sent.

Why Provability Does Not Change

You might wonder: "If the computer plays for me, can it cheat?"

The answer is no, because of the separation of information:

  1. The Server (which knows where the mines are) cannot control your selection. Your selection is generated locally in your browser.
  2. The Client (which makes the selection) does not know where the mines are. The mine locations are encrypted in the game seed hash.

Since the "Map Maker" (Server) and the "Path Finder" (Client) are blind to each other's secrets during the game, the probability of winning is purely mathematical and cannot be rigged.


Verifying & Customizing the Selector

We believe in "Don't Trust, Verify." If you don't trust the default randomization in the Moonshot UI, you have full control to change it.

Edit the Random Selection Process

You can access these controls by navigating to Profile -> Randomness Settings. Here, you can view and edit the exact JavaScript function used to pick tiles.

  • Default: Uses Math.random() to pick a random tile.
  • Custom: You can write your own code.

This means you can:

  • Use your own Pseudo-Random Number Generator (PRNG).
  • Implement a specific pattern (e.g., "Always pick tile 0").
  • Call an External API: If you want true external randomness, you can write a function that fetches a value from a third-party randomness beacon or your own server (e.g., using synchronous requests or pre-fetched buffers) to decide the next move.
// Example of a custom selection logic you could write
function selectTile(max) {
  // Use the current time milliseconds as a simple seed
  return Date.now() % max;
}

By giving you access to the "brain" of the auto-player, we ensure that you don't have to trust our UI code—you can audit it, rewrite it, or replace it entirely.