← Economy

The Exchange

The Exchange

The single global order-book market — atomic, server-authoritative, and structurally dupe-proof.

The Exchange is the soul of Godmaw’s economy — a single, server-wide order-book auction house where every transaction is atomic, server-authoritative, and structurally impossible to dupe. It is not a convenience feature. It is the immune system of the entire game.

What It Is

The Exchange is accessed from THE EXCHANGE terminal in the shared Nexus hub. It is one global market, spanning every realm and Nexus instance simultaneously. Every item type in the game has a single, unified book — deep, liquid, and server-wide.

Unlike the fixed-price listing boards common in private servers, The Exchange runs a real order book: players place resting BUY orders (bids) and SELL orders (asks), which the server matches at price-time priority. The result is genuine price discovery. The UI surfaces the best bid and best ask with a quantity field; the full order-book depth is available for those who want it, but not forced on anyone.

Placing Orders

SELL order: when you list an item, its ownership is transferred immediately to a system MARKET account. The item is locked — it cannot be used, traded, or listed elsewhere while it rests on the book. You receive nothing until a buyer fills your ask.

BUY order: when you place a bid, the Token amount is debited immediately to a system ESCROW account. The Tokens are locked against your order. This is the EVE Online guarantee: a fill can never fail because the buyer ran out of funds mid-settlement.

The book key is item type — all Railguns share one market. A SELL of quantity N escrows N distinct item instances; a BUY of quantity N escrows N × price in Tokens. Partial fills are supported: if you bid for 10 items and only 3 are available at your price, 3 settle immediately and the order rests for the remaining 7.

Canceling an order returns the escrow atomically — the item comes back to the seller, or the Tokens come back to the buyer. No partial-cancel lag.

Settlement: One ACID Transaction

Every match settles in a single atomic database transaction. All steps commit together or none do:

  1. The item moves from MARKET to the buyer — the same unique database row, owner_id updated in place. No copy is ever made.
  2. Tokens move from ESCROW to the seller’s wallet.
  3. A broker fee (~3%, sim-tunable) drains to a SINK account — a permanent Token removal, the market’s inflation guard.
  4. Order statuses update, a trade tape entry is written, and an audit log row is appended with the transaction ID.

If the buyer is offline when the fill happens, the item is already theirs in the database. A delivery inbox notice waits for them; no item ever floats in limbo between accounts.

Every step shares one transaction ID. There is no window — however small — where an item or Tokens exist twice or simply vanish.

The Three Anti-Dupe Mechanisms

Unique-row ownership. Each item in Godmaw is exactly one row in the database, identified by a UUID primary key. Duplication would require inserting a second row for the same instance — structurally forbidden. Items are never copied on transfer; only the owner column is updated.

Double-entry ledger. Tokens are not stored in a mutable balance field that can silently corrupt. Every Token movement is an immutable signed ledger entry; every transaction’s legs sum to zero. A continuously-checkable invariant holds across the entire economy: the sum of all player wallets must equal total minted minus total destroyed. Any violation identifies the exact transaction that broke it.

Idempotency keys. Every mutating request carries a unique key. A retry or replay returns the cached result and applies nothing. Two concurrent requests with the same key: one wins, one is told “already done.” This makes exactly-once execution hold even across flaky network conditions.

The client never decides value. Realm processes can propose loot and locally generate item IDs, but all value movements — every trade, transfer, and currency credit — go through the meta-server’s validated transactions. The client is never trusted on anything that touches money or inventory state.

Why It Matters

Duplication exploits collapsed Realm of the Mad God’s economy. Every item and every Token in Godmaw is part of a ledger that cannot be deceived. The Exchange is the mechanism that makes a player-driven economy trustworthy enough to be worth caring about.

OPEN: broker fee % is provisionally 3% (tunable constant). Final % is sim/economy tuning post-launch.