ABOUT

A chess site built ledger-first, because that is the part that has to be right.

Gambit is chess where two players stake into an escrowed pot and the winner collects it, minus a small cut. The chess is the easy half.

WHY IT IS BUILT THIS WAY

Two decisions the rest of the product follows from.

A double-entry ledger, not a balance column

A number in a row is easy to write and impossible to argue with when it is wrong. A ledger is a list of movements that must sum to zero, so the balance is derived rather than asserted, and the whole system can be checked: every entry sums to zero, and every account's balance equals the sum of its own entries.

It is also what makes retries safe. Every transfer carries a key derived from the event that caused it, so a settlement can be attempted twice and happen once — which matters, because the thing most likely to try settling a game twice is the server recovering from a failure.

Deposits into a balance, not a charge per game

This one is arithmetic rather than taste. At the bottom of the stake ladder the house cut on a whole pot is a couple of cents, while a card transaction costs roughly thirty cents plus a percentage. Charging a card per game would lose money on every game played at the bottom rung, which is the rung that lets anyone in at all.

So money is deposited once into a balance with a meaningful minimum and staked from there — and that requires somewhere trustworthy to keep it, which is the ledger again.

The server referees; the browser only draws

Move legality, clocks and outcomes are computed server-side from stored history. The browser imports the same rules engine, but only so it can grey out an illegal move and preview a premove — it is never asked what the position is or how much time is left. Anything a client says is a request, and the server is free to disagree with it.

WHERE IT IS
  • PLAYABLE

    Lobby, staked and casual seats, handicaps, practice bots, live games, ratings, a leaderboard, a wallet and a statement.

  • PLAY CREDITS

    No real money moves. The real-money payment provider is a stub that refuses by design.

  • NOT BUILT

    Tournaments, engine analysis of your games, puzzles, opening repertoires and public profiles. Each of these is marked as unbuilt inside the app rather than hidden.

HOW IT IS CHECKED

The parts that cost money are tested against the real thing.

Not because tests are a marketing feature, but because the failure modes here are concurrency failures, and none of them exist in a mock.

Against a real database

Row locks, conflict semantics and the constraint that stops an account going negative are the actual guarantees, so the money tests run against Postgres. They cover concurrent double-spend, double settlement, settling after a timeout and duplicate move submission.

End to end, over HTTP

One test drives the assembled system: two real accounts, a seat opened and taken, a game played to checkmate over the wire, the pot settled and the ratings moved. It is the only check that can catch a wiring fault between the router and the browser.

Ratings against the paper

Glicko-2 is implemented from Glickman's specification and verified against the worked example published with it, so the rating maths is checked against the canonical numbers rather than against our own belief about them.

The gap that matters most is engine assistance. Move-timing and collusion signals rank games and account pairs for human review, but move-quality analysis against an engine — the stronger signal — is not built, and competitive cash chess should not launch without it. That is stated here for the same reason it is stated in the repository's own README.

Have a game.

Everything above is running right now, on play credits. Read the FAQ first if you would rather know the awkward parts before you sign up.