Skip to content

GameFi

Three games run alongside the DEX, sharing the same backend, the same wallet identity and the same BlazPoints economy.

Home: rewards.blazpay.com

Prediction markets

Price-prediction betting with leaderboards and win/loss statistics.

ConcernWhere
Routesbz-backend/routes/predictionRoutes.js/api/prediction
Market modelmodels/predictionMarketModel.js
Bet modelmodels/predictionBetModel.js
Per-user statsmodels/userPredictionStatsModel.js
Settlement cronservices/predictionCron.js, started via initPredictionCron() in index.js

A market has a subject (a token), a direction, a threshold and a resolution time. Users bet; the cron resolves against a price feed at expiry and settles.

userPredictionStatsModel keeps the aggregate — wins, losses, streaks — which is what feeds the leaderboard rather than recomputing from bets each time.

Poker

On-chain poker tournaments with hand history.

ConcernWhere
Contractcontract-deployment/contracts/poker/PokerManager.sol
Routesroutes/pokerRoutes.js/api/poker
Table / game modelmodels/pokerModel.js
Hand historymodels/pokerHandHistory.js
Docs in repobz-backend/poker.md, pokerFrontend.md

PokerManager.sol is the on-chain component; the backend runs table state and dealing, and persists hand history so a hand can be replayed and disputed.

Realtime table updates go over Socket.io — see runtime topology. bz-backend/SOCKET_DEBUG_GUIDE.md is the debugging reference when a table desynchronises.

Mines

A mining mini-game. models/MinesGame.js, plus models/RouletteSpin.js for a spin mechanic.

Mines is the simplest of the three: reveal tiles, avoid the mine, cash out. It exists mainly as a low-friction BlazPoints sink.

Shared game infrastructure

ConcernWhere
Generic game modelmodels/game.js
Game walletmodels/gameWalletModel.js
Routesroutes/gameRoutes.js/api/game
Contractcontracts/Blazpay_ProductsV2.sol (per chain)
Games ABIutils/abi/games.json

Blazpay_ProductsV2.sol is deployed per chain (arbitrum_sepolia, avax, hemi, qubetics, soneium directories) and is the shared on-chain product contract the games settle against.

Economics

Games are a BlazPoints sink and a retention loop, not a revenue line. Points earned from staking and quests get spent here or in the marketplace, which is what stops points from being pure inflation.

The business analysis is in bz-backend/MODULE_BUSINESS_AUDIT_2026-06.md.

Known limits

  • No BlazAI intents. None of the three games is reachable from chat.
  • Realtime state is Socket.io-dependent. A dropped connection during a poker hand needs a resync path; SOCKET_DEBUG_GUIDE.md exists because this has been a real problem.
  • Prediction settlement depends on a price feed at a single point in time, which is manipulable in thin markets. Market selection matters.
  • Regulatory surface. Prediction markets and poker are gambling-adjacent in many jurisdictions. That is a product and legal question, not an engineering one, but it is a real constraint on where these can be promoted.
  • Documented in ad-hoc repo markdown, not here. poker.md and pokerFrontend.md are the authority for endpoint-level detail.

Internal + developer documentation. Usage figures are point-in-time snapshots — re-verify before publishing them.