In this post
  1. What "on the server" means here
  2. This is harder to build
  3. The reason is not only cheating
  4. The third reason nobody mentions
  5. When this is overkill

CyberDropX started as one minigame and became eighteen — plinko, mines, hi-lo, tower, code breaker, scratch card, reflex and others, all with sub-minute rounds. On top of that sit missions, squads, referrals, a global leaderboard and withdrawals.

The hard part was not the games. It was moving the entire economy to the server.

What "on the server" means here

Every reward is decided in a Cloud Function. The client does not compute gains, does not validate matches and does not report results — it reports intent, and the server answers with the outcome.

The distinction between reporting a result and reporting intent is the most important thing in this post:

The client sendsConsequence
"I won 300 coins"no validation can fix this
"I started match X" / "I picked tile 3"the server decides, and its decision is truth

If the client sends the result, any later verification is heuristics. If it sends the move, there is nothing to verify — it never had the information needed to lie.

Validating what the client reported is a losing game. The only design that works is the client not having the information it could falsify.

This is harder to build

The cost is real, and worth being specific about:

  • every value action becomes a network round trip
  • state must be reconciled when the answer is slow or lost
  • there is no offline mode for anything touching the economy
  • a network error mid-match needs handling — and "retry" must not award twice

That last item deserves a note: every value operation must be idempotent. If the player taps twice, if the network retries, if the app restarts mid-flight, the result must be the same. Without that, an honest player becomes a source of inconsistency.

What softens the latency is a clear split:

match             -> runs locally, immediate feedback
round outcome     -> decided on the server
balance and rank  -> only what the server says

The animation, the sound and the feel happen on the device. The number that matters comes from outside.

The reason is not only cheating

The obvious answer to "why on the server" is so nobody cheats, and it is correct — but it is the least interesting one.

The real reason is this:

A client-side economy is an economy you cannot change.

If balancing lives inside the app, fixing a number requires a new version, store review, and waiting for everyone to update. In practice that means an urgent fix takes days rather than minutes; the game stays unbalanced meanwhile; and even afterwards, whoever did not update is playing a different economy — in the same leaderboard.

With the logic on the server, a balance change is a deploy.

In a game with eighteen modes and a global leaderboard, you will get the balance wrong. The only question is how long it takes to fix.

The third reason nobody mentions

There is a benefit that appears later and is large: observability.

When every value decision passes through the server, you have a record of all of them. That answers questions that are impossible from the client side: which of the eighteen modes people actually play, where in a session they stop, which reward drives next-day return, whether an anomalous pattern is concentrated in a few accounts.

None of those requires tracking users beyond what is necessary — they are events of the economy itself, which had to exist for the game to work.

And a practical side effect: when someone claims their balance is wrong, there is a history to check. Without it, the conversation is the player's word against a number.

When this is overkill

The deciding question:

Is there anything of real value on the outside — withdrawals, prizes, a leaderboard that pays, an item bought with money?

If not, a server-side economy is complexity without return. A purely local idle game gains nothing from it — the only person harmed by cheating is the cheater.

If yes, it is not optional. And note that the trigger arrives late: many games start without external value and gain it later. Migrating an economy from client to server with an installed base is one of the worst tasks there is, because it means deciding what to do with balances that may have been obtained invalidly.

Frequently asked questions

Doesn't this make the game slower?

It does, and that is the real cost. Every value action becomes a round trip. What softens it is separating what needs the server from what does not: the match runs locally, only the outcome is decided remotely.

Can you play offline?

Not for anything involving the economy. A minigame may run without a network, but the prize only exists once the server agrees. Pretending the reward was granted and reconciling later creates the worst outcome: a number the player watches disappear.

How do you stop the client reporting its own result?

By not asking it for one. The client sends intent — 'I started this match', 'I picked tile 3' — and the server decides the outcome. If the client sends 'I won 300', no validation can fix that.

Is this complexity worth it in a small game?

It depends on one question: is there anything of real value on the outside — withdrawals, prizes, a leaderboard that pays out? If not, it is overkill. If so, it is not optional.