Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Contracts

Glitch Bomb is fully onchain: the game engine, the token, staking, and governance are Cairo contracts built with Dojo Engine on Starknet. The source lives in the cartridge-gg/glitchbomb repository under contracts/.

Systems

ContractRole
PlayThe game engine: create a game, pull orbs, buy/burn/refresh in the shop, enter levels, cash out, claim rewards
SetupAdmin configuration: entry price, vault revenue share, starter pack registration
TokenThe GLITCH ERC-20 reward token, minted on reward claims
VaultThe staking vault: an ERC-4626 vault issuing vGLITCH shares, distributing a share of game revenue to stakers, with vote tracking
GovernorOpenZeppelin governor using vGLITCH voting units, with delay, period, and quorum settings
TreasuryTimelock controller executing approved governance proposals and holding protocol funds
CollectionERC-721 collection — each ranked game is a token
FaucetTest USDC faucet used on test networks

Game state

The full game state fits in a single compact model, updated on every action:

  • the bag is a packed list of orb ids (up to 50 orbs)
  • pulled orbs are tracked as a bitmap — one bit per orb slot; the Bomberang's bit is never set, which is what makes it "sticky"
  • curses are bit flags on the game
  • the shop packs its 6 offers, the burn/refresh flags, and per-orb purchase counters into one field

Every pull, purchase, and level transition is emitted as an event and indexed by Torii, which is what the game client renders in real time.

Randomness

Ranked pulls are seeded by Cartridge VRF, a verifiable random function whose output is proven onchain — see Randomness.

Determinism and the practice engine

The game rules are deterministic given a seed, which allows the client to embed a TypeScript mirror of the Cairo engine for free practice games — same milestones, prices, and bag mechanics, no transactions required.

Last updated: