Skip to main content
All Case Studies
Real-Time InteractionsSecurity-Conscious DesignPlatform ReliabilityData-Rich Product
Duelana preview 1
Duelana preview 2
Duelana preview 3
Duelana preview 4
Duelana preview 5
1 / 5

Duelana

Enables trustless peer-to-peer wagering on Solana with verifiable game outcomes and no centralized credential model.

A real-money crypto gambling platform built on Solana where players wager SOL tokens in provably fair casino-style games, including coinflip, jackpot, and multi-room blackjack with real-time gameplay.

3 Playable game modes
6 Blackjack rooms
2 Jackpot pool tiers

Overview

Duelana is a browser-based crypto casino for Solana users. Players authenticate with Phantom wallet, deposit SOL converted to internal chips, and play across three games. Fairness uses cryptographic commitments verifiable after each round. Frontend runs as React SPA with GraphQL bootstrap and Socket.IO live updates into Redux.

The Challenge

Deliver trust-sensitive real-money gameplay with verifiable fairness, wallet-native auth, resilient real-time UX, and precise blockchain denomination handling.

Solution

Implemented ticket-hash provably-fair commitments, Phantom signature auth issuing JWT, dual data pipeline (Apollo + Socket.IO), and lamport-only internal arithmetic with display-boundary conversion.

Implementation Highlights

Provably Fair Gambling

Each round commits ticket_hash before resolution and exposes verification path after completion.

Blackjack Spatial Seating Engine

Seat positions adapt for 2-7 players with full client-side card scoring and ace handling.

typescript
                                function calculateBlackjackCardsPoints(cards: string[]): number {
  let total = 0, aces = 0;
  for (const card of cards) {
    const val = getCardValue(card);
    if (val === 11) aces++;
    total += val;
  }
  while (total > 21 && aces > 0) { total -= 10; aces--; }
  return total;
}
                            

Dual-Source Real-Time State

Apollo loads initial snapshot, Socket.IO streams incremental updates into Redux slices.

Mock Dev Infrastructure

Mock Apollo link and mock socket paths allow full frontend work without backend availability.

Impact

  • Players independently verify outcomes via provably fair ticket system
  • Referral parameters in blackjack support organic growth loops
  • Experience and level mechanics improve retention
  • Wallet-signature auth removes email/password onboarding friction

Tech Stack

architecture & design

API DesignScalable System PatterningSystem Analysis

workflow

ScrumJira

soft skill

Team WorkProject Ownership

languages & runtimes

Node.jsTypeScript

database & orm

PostgreSQLRedis

back end

SocketsGraphQL

front end

Next.js

cloud / devops

Git / GithubGithub Actions

Key Learnings

Lamport-only arithmetic avoids subtle floating-point wager bugs

Wallet signature auth needs strict JWT lifecycle design

Dual source pipelines require explicit reconciliation strategy

Provably fair mechanics are cheaper to design early than retrofit

Interested in building something similar?

Let's design a scalable solution tailored to your needs.

Schedule a Call