YatiBet (Concurrency-Safe Transaction System)

Real-Time Transaction & Balance Locking Engine — 2025

YatiBet (Concurrency-Safe Transaction System) — Real-Time Transaction & Balance Locking Engine — 2025

Tech Stack

Next.jsDjangoPostgreSQLRedisWebSocketsAtomic Transactions

My Role

Designed wallet management, live odds updates, and settlement logic under high concurrency.

Team

Solo Project
System Design & Development

Timeline

2025 • Real-time Systems Demo

Overview

YatiBet is a comprehensive real-time betting simulation platform developed to demonstrate advanced transaction handling, concurrency control, and settlement workflows in a high-stakes environment. The problem it solves is providing a safe, educational sandbox to model the complex financial mechanics required in live betting applications—specifically addressing race conditions, atomic operations, and real-time state synchronization across distributed clients. The system's architecture leverages Next.js on the frontend and Django with PostgreSQL and Redis on the backend. A core architectural requirement was ensuring absolute data integrity for financial transactions. I utilized PostgreSQL's robust ACID compliance, implementing atomic database transactions with row-level locking (using SELECT ... FOR UPDATE). This guarantees that user wallet balances are strictly locked during a bet placement, preventing any possibility of double-spending or race conditions when multiple bets are placed simultaneously. Live match odds and system events are pushed to connected clients via WebSockets, managed by Django Channels and a Redis backing store. One of the most complex challenges was designing the automated settlement pipeline. When a match concludes, the system must process thousands of pending bets, calculate payouts based on locked odds, and update wallet balances simultaneously without locking up the entire database. I solved this by implementing batch processing strategies and celery-backed background tasks that handle settlements asynchronously. The outcome is a highly resilient, real-time platform that successfully models enterprise-grade financial transaction safety and distributed system synchronization.

What I Built

  • Live IPL match odds engine with real-time WebSocket updates
  • Atomic wallet transactions with balance locking and rollback on failure
  • Concurrency control preventing race conditions on simultaneous bets
  • Automated settlement pipeline resolving all bets after match result
  • Admin panel with live transaction logs and audit trail

Key Highlights

Atomic Transactions

Balance locking and rollback mechanisms prevent double-spending.

Live Odds Updates

Real-time IPL match odds streamed via WebSockets.

Settlement Pipelines

Automated bet resolution and payout processing post-match.

YatiBet live IPL match odds and betting interface
YatiBet wallet balance and transaction history panel
YatiBet bet settlement and result processing screen
YatiBet admin panel showing concurrent transaction logs

Interested?

Want to explore YatiBet (Concurrency-Safe Transaction System)?

A real-time transaction engine built with Next.js, Django, and Redis. Features atomic wallet balances, row-level locking (SELECT FOR UPDATE), WebSocket odds streaming, and automated settlement pipelines.