Backend Engine, Deterministic Game Verifier & Stellar Testnet Indexer
The backend orchestration and verification layer for the Stellar Splash gaming platform. It manages tournament lifecycles, issues anti-cheat session tokens, computes deterministic scores from raw game events, verifies real Stellar Testnet funding transactions, and reconciles prize pools against on-chain ledger records.
| Resource / Transaction | Details / Stellar Explorer Link |
|---|---|
| Live Web Application (Netlify) | https://stellar-splash.netlify.app |
| Soroban Smart Contract ID | CACHWJEZY6JN36VFACWRQ7FP4T5EPRRRNBVLOSFHXTJHETZY36JD7QYJ |
| Stellar Expert Contract Explorer | View Contract on Stellar Expert |
| Stellar Lab Contract Explorer | View Contract in Stellar Lab |
| Contract Deploy Transaction | 36e93d93...6fb0 (Stellar Expert Tx) |
| WASM Upload Transaction | 268685ea...fbe0 (Stellar Expert Tx) |
| Admin Initialization Transaction | 27b3773d...1a11 (Stellar Expert Tx) |
| Live Tournament Test Tx | 022786a7...2d7 (Stellar Expert Tx) |
| Contract Admin Address | GCQ3OLBMJUGWN3PHYE3SDIKKIPVLJSFFWG4Q4CEABGHWGBEBPBKMY6OW |
| WASM Code Hash | f4c5ffc8ce6364eccb4c2a3daac045c508ba4f2d16b3a345d3c5f208057fb2d5 |
| Network | Stellar Testnet (Passphrase: Test SDF Network ; September 2015) |
| Horizon RPC | https://horizon-testnet.stellar.org |
| Soroban RPC | https://soroban-testnet.stellar.org |
The engine indexes Stellar ledger transactions to independently verify creator prize deposits before opening tournaments.
Replays raw gameplay event streams to detect client score tampering and issue cryptographic match attestations.
Enforces the 10,000 basis points rule (
Computes finalized tournament rankings using a 3-tier tie-breaking algorithm and produces a canonical SHA-256 ranking hash.
Evaluates the 5-point eligibility pipeline, authorizes payout batches, and executes Stellar Testnet transfers with individual receipt tracking.
Provides dedicated REST endpoints for player payout histories, indexing on-chain transactions and verifying accounting reconciliation.
+-----------------------+
| Express REST API |
| & SSE Broadcaster |
+-----------------------+
|
+------------------------------+------------------------------+
| | |
v v v
+-----------------+ +-----------------+ +-----------------+
| Game & Match | | Tournament | | Blockchain |
| Engine | | Engine | | Indexer |
+-----------------+ +-----------------+ +-----------------+
| - Session token | | - Registration | | - Horizon API |
| - Event stream | | - State machine | | - Tx validation |
| - Integer score | | - Capacity rule | | - Vault auditor |
| - Result hash | | - Leaderboard | | - Reconcile |
+-----------------+ +-----------------+ +-----------------+
| | |
+------------------------------+------------------------------+
|
v
+-----------------------+
| Store / Audit Ledger |
+-----------------------+
GET /api/tournaments: List all tournaments and states.GET /api/tournaments/:id: Fetch specific tournament configuration.POST /api/tournaments: Create a new tournament (initializes inFUNDINGstate).POST /api/tournaments/:id/join: Register a player wallet into an open tournament.GET /api/tournaments/:id/leaderboard: Query live leaderboard distinguishing Current Score from Final Verified Result.
POST /api/verification/match/:id: Trigger independent replay verification of a completed match.GET /api/verification/match/:id: Retrieve verification record and signed cryptographic attestation.
GET /api/rankings/:tournamentId: Retrieve deterministic tournament ranking.POST /api/rankings/:tournamentId/finalize: Finalize tournament ranking and commit to canonical ranking hash.
GET /api/agreements/:tournamentId: List all versioned prize agreements for a tournament.GET /api/agreements/:tournamentId/active: Retrieve active (orLOCKED) prize agreement.POST /api/agreements: Create a new prize agreement version (enforces 10,000 bps rule).POST /api/agreements/:tournamentId/:version/approve: Creator approves specific agreement version and hash.POST /api/agreements/:tournamentId/:version/lock: Lock agreement permanently.
GET /api/settlements/:tournamentId/eligibility: Evaluate strict 5-point settlement eligibility pipeline.GET /api/settlements/:tournamentId/preview: Preview deterministic basis-point allocations, residual dust handling, and accounting invariants.POST /api/settlements/:tournamentId/authorize: Cryptographically authorize settlement against exact agreement and ranking commitments.POST /api/settlements/:tournamentId/execute: Submit multi-recipient Stellar Testnet transfers with real transaction tracking.GET /api/settlements/:tournamentId: Retrieve settlement record and reconciliation status.POST /api/settlements/:settlementId/reconcile: Trigger independent verification comparing expected vs observed on-chain allocations.GET /api/settlements/player/:playerWallet: Retrieve player's historical payouts with explorer links.
GET /api/events: Server-Sent Events (SSE) streaming channel.
Run the automated test suite covering all modules:
npm testAll 39 unit and integration tests execute cleanly:
tournament.test.tsscoring.test.tsverification.test.tsranking.test.tsagreement.test.tssettlement.test.ts
npm install
npm run build
npm startBy default, the server listens on http://localhost:4000.





