← all projects

xGame.io

client

Making a game feel live on a flaky and eventually consistent blockchain network.

role Lead full stack developer impact $300k of volume in week one and an uneventful launch 2025

I partnered up with this dev shop in early 2025 and one of their clients was xgame.io, a blockchain-based crash game. The game is not too complex: a round starts, it is marked so on-chain, then the off-chain oracle reveals a crash point and settles the payouts.

Initially I owned an indexer and analytics dashboard that helped them track live games, referral fees and whatnot. That was relatively uneventful as, after Dextrac, I’m pretty knowledgeable about indexers.

The harder part came once I set them up with better observability across the system (cross-service traces, etc) and we went into beta testing. Everything ran fine on Base and BNB. It was a fun game to play too. But Pulsechain, an integral part of the brand, was a very flaky blockchain network / ecosystem.

One RPC call thinks you’re on block 101 when the second thinks you’re on block 100 actually. Gas estimates were often completely wrong and off by a mile. To top it off a block takes 10-seconds.

The game had to feel at least somewhat live, even on Pulsechain.

After a lot of experimentation we converged on this rough “relayer” flow:

  1. system forms and requests a transaction to be relayed
  2. relayed compares the latest confirmed nonce against the mempool nonce. If they match, nothing’s stuck. 3.a. if a tx is stuck, cancel it with a zero-transfer at stepped-up gas, retrying with gas bumps. 3.b. with nothing stuck, send the real round tx, again bumping gas and retrying, checking getTranssactionReceipt on every retry (in case the tx would land from a previous send while we’re retrying).
  3. if none of that lands a tx, the round goes to an ERROR state everyone sees over websockets, we refund balances and drop cleanly back to waiting for a new round.

Each relayer instance would only manage one single address so we didn’t have to do much nonce management. For gas estimates we’d use the RPCs but also an external service and pick what’s biggest. We also had retry policies with jitter and exponential backoff on everything external, of course.

First week did $300k in volume and, more to the point, the week was uneventful.


← all projects