Back to Engineering Notes

Platform Engineering

Why BoredGamez stores a virtual-coin ledger beside the wallet balance

A first-party account of the balance and ledger model used to make cross-game virtual-coin changes reviewable.

Author
BoredGamez Engineering
Published
Published July 9, 2026
Reading time
6 minute read

Part 1

A balance alone cannot explain itself

The wallet stores the current virtual-coin balance, but BoredGamez also writes ledger entries for material changes. A ledger row records the user, signed amount, resulting balance, event type, game, related round identifier, and time. That creates context for support and reconciliation that a single mutable number cannot provide.

For a typical round, entry is recorded as a negative balance change and a successful settlement as a separate positive change. The game and round reference connect those entries to the underlying result. Values remain in integer cents so wallet arithmetic does not depend on floating-point display calculations.

Part 2

Game result and wallet settlement belong together

Critical routes use database transactions so the round update, wallet change, and ledger entry either complete together or fail together. Mines cash-out, for example, validates the active round, calculates its multiplier, updates the round, credits the wallet, and writes the payout record in one transactional flow.

Idempotent settlement is equally important. Multiplayer results such as Case Battles mark a battle as settled so a repeated request cannot award the same outcome twice. The browser can refresh its balance after settlement, but it does not decide the credited amount.

  • Wallet values are integer virtual cents.
  • Ledger deltas record the direction and reason for a change.
  • Server transactions protect related game and wallet updates.

Part 3

What the ledger does not make the coins

Accounting detail does not turn a BoredGamez balance into money. Virtual coins cannot be withdrawn, transferred between accounts, exchanged for cash or crypto, or sold through the platform. The ledger exists to make an entertainment system easier to operate and support.

That distinction is repeated in the wallet, public explainers, and terms because visual precision can otherwise make a virtual balance look financial. The product goal is traceable game state, not stored monetary value.