LineraBet

Experience the next evolution of online casinos.

About

## Wave 1 submission

Detailed Docs and Video Link: https://drive.google.com/drive/folders/1kq49iLPeSuWM2khCXrDZ7oWEJfrkF09y?usp=drive_link

## Wave 2 submission

This wave transforms LineraBet from a front-end prototype into a fully-featured, multi-game on-chain casino with integrated wallet support. The platform now includes three complete casino games running with Linera smart contracts and live blockchain connectivity. • YouTube Demo: https://youtu.be/bJLw07WE0bc • Live App: https://linerabet-ipfe.vercel.app/

  • Smart Contracts (Linera Testnet Conway)

Three on-chain game logic contracts manage all gameplay, betting, and settlement: a) Blackjack (contracts/blackjack/) • Full betting flow with hit/stand mechanics • 20-second turn timers for player actions

b) Baccarat (contracts/baccarat/)

• Player / Banker / Tie bets • Natural hand detection, push scenarios • Banker commission and payout handling

c) Roulette (contracts/roulette/)

• American roulette wheel • Full bet coverage: straight-up, color, parity, ranges, dozens, columns

Shared Contract Features:

• Multi-deck support for card games (configurable 6–8 decks for baccarat) • Dynamic payout calculations (e.g., 8:1 tie bets, banker commission) • GraphQL interface for frontend integration • State persistence via Linera Views (e.g., RegisterView, LogView for history)

Deployed Contract Addresses (Testnet Conway): • Baccarat: d52899cd1558f88e739daf59bb24d50da5c6b179d27e38d0d6f70c569bfe04b2 • Roulette: f56b382e9ca70912a0a31b28c654525a534318b6d6d3d19387272445c5042586 • Blackjack: e9d1d166e03b05b053dbc7f7aaa136e55159d7dea6c65ac361b7230c7758cc1b

  • Dynamic Wallet x Linera Integration

Core Components:

• DynamicSigner (src/lib/dynamic-signer.ts): Bridges Dynamic wallets to Linera • LineraAdapter (src/lib/linera-adapter.ts): Singleton managing Linera connections

Key Capabilities:

• EIP-191-compatible message signing to satisfy Linera requirements • Multi-step flow: wallet connection → chain connection → app connection • Real-time connection state via React hooks • Robust error handling for network issues and wallet disconnects • Supports multiple Ethereum wallet types through Dynamic’s connectors

  • Frontend Application (React + TypeScript + Vite)

Baccarat (src/pages/baccarat.tsx):

• Animated dealing and reveal • Live hand value and naturals • Correct banker commission logic

Roulette (src/pages/roulette.tsx):

• Physics-style wheel animation • Full betting table with chips and visual feedback • Spin history and result animations

Blackjack (src/pages/blackjack.tsx):

• Turn-based play with timers • Hit/stand decisions and dealer AI • Bust detection and payouts

4) Blockchain Integration Layer

• GraphQL-based interaction with Linera contracts • Real-time sync between UI and on-chain state • Operation scheduling via Linera mutations • Persistent on-chain game history and balances • Bet validation, insufficient-funds checks, and automatic round resets

## Wave 3 submission

Blackjack now runs fully in the browser (no CLI / local node UX) Removed the dependency on manually running the Linera CLI testnet and local GraphQL node for the Blackjack flow. Blackjack is now a pure web experience: users interact entirely through their browser, while the app talks to Linera via the JS/WASM client instead of the CLI. The frontend now lets users (for Blackjack only): Connect with a Dynamic web wallet, Add money (request chips) directly from the browser, Play Blackjack (Hit / Stand) with all moves signed by their web wallet and executed on Linera.

Dynamic Wallet ↔ Linera bridge (Blackjack-only DynamicSigner + LineraAdapter) Implemented a custom DynamicSigner that plugs into the Linera JS client and uses an Ethereum browser wallet (via Dynamic) to sign Linera blocks. Fixed the double-hashing issue by using personal_sign on the raw bytes provided by Linera, so signatures validate correctly on-chain. Built a LineraAdapter singleton that wires the frontend to the deployed Blackjack application (Blackjack APP_ID: 8382f4247cf42d835b7702cc642a942ebd7fd801e6baa49e78146ce0cb4422a2).

Note: This signer/adapter setup is currently scoped to Blackjack only; Roulette and Baccarat will be integrated in the next wave.

End-to-end Blackjack DApp flow (add money, hit, stand) Implemented the full Blackjack game loop via GraphQL mutations backed by Rust operations: RequestChips, StartGame { bet }, Hit, Stand, and Reset. A user can now fund their balance, start a game with a bet, and play out the hand entirely in the browser, with every action resulting in a signed block on Linera.

Video: https://drive.google.com/file/d/1NAjV60fxXrjRmp_nwcfdvhRvldnDPbJi/view?usp=sharing Demo Link: https://linerabet-ipfe.vercel.app/

## Wave 4 submission

In this Wave, I completed and deployed 3 on-chain casino games—Blackjack, Roulette, and Baccarat—all implemented inside one unified smart contract, and I improved the project’s overall usability and developer experience with documentation + deployment fixes.

Key deliverables

  • Single smart contract casino suite (3 games): Implemented Blackjack, Roulette, and Baccarat under one contract/application so users interact with a single on-chain backend for all games.
  • Unified chip economy across all games: Added a shared “casino balance” system where users convert 1 Linera test coin → 100 chips. All game actions and game states (bets, outcomes, results, balances, phases) are managed using this chip system for a consistent multi-game experience.
  • Fully on-chain randomness: Game outcomes are determined using on-chain RNG to keep results deterministic and verifiable by the chain (no off-chain RNG dependency).
  • Live demo unblock (SharedArrayBuffer / COOP-COEP fix): The live demo was initially blocked by a SharedArrayBuffer error due to missing COOP/COEP headers. Fixed the deployment/header configuration so the demo now runs correctly in the browser.
  • Developer Guide & Documentation: Wrote a full LineraBet Developer Guide that documents the project from fundamentals to full DApp implementation. This includes Linera overview + core concepts (microchains, messaging, wallet-driven blocks), progressive examples: Counter → Blackjack → Roulette → Baccarat, detailed sections on Dynamic Wallet integration (including the critical personal_sign signing flow to avoid double-hashing) and Deployment instructions (publish/create app, configure App ID, connect frontend).

Video: https://drive.google.com/drive/folders/14nuJLlqCRh51M2UtzU9SjAXVdBC0Ko_j?usp=sharing

Live demo: https://linerabet-ipfe.vercel.app/

## Wave 5 submission

Refactored the dApp into a real two-chain design: Player Chain (user gameplay + UI state) and Bank Chain (house balance + verification + settlement). Implemented cross-chain messaging end-to-end (Player Chain ↔ Bank Chain), so it’s no longer a single-chain contract.

  • Blackjack

Player Chain → Bank Chain: RequestGame(Blackjack, bet) Bank Chain → Player Chain: GameReady(game_id, seed) Player plays locally (Hit/Stand/DoubleDown), then: Player Chain → Bank Chain: ReportResult(game_id, actions) Bank Chain → Player Chain: GameSettled(result, payout, dealer_hand) after deterministic replay + verification.

  • Roulette

Player Chain → Bank Chain: RequestRouletteGame(bets) Bank Chain → Player Chain: RouletteGameReady(game_id, seed) Player computes outcome from seed, then: Player Chain → Bank Chain: ReportRouletteResult(game_id, claimed_outcome) Bank Chain → Player Chain: RouletteSettled(outcome, payout) after verifying outcome + paying using stored bets.

  • Baccarat

Player Chain → Bank Chain: RequestBaccaratGame(amount, bet_type) Bank Chain: runs the game authoritatively using seed + rules, computes payout. Bank Chain → Player Chain: BaccaratSettled(winner, payout, hands/scores) (one roundtrip).

  • Other improvements

Dynamic wallet UX (fewer signing prompts)

Improved the wallet flow so the user doesn’t need to manually sign every single interaction during gameplay. This is especially important because cross-chain operations can otherwise cause repeated signing / approval prompts, which feels slow and breaks the casino “fast-play” experience. Even with the smoother UX, actions are still transparent and traceable, you can verify what happened through: Docker container logs (server/runtime side) Browser console logs (client side), which show the sequence of requests/messages and outcomes.

UI redesign (fun theme + better experience)

Reworked the UI prompts and layout into a more fun, casino-themed experience (so it feels like playing an actual game, not clicking through a technical demo). Updated the visual style to be more engaging and lively, while still keeping the gameplay UI clear and easy to follow.

Deployment + network choice (speed + accessibility)

Switched from Testnet to Devnet mainly due to performance/speed, the faster confirmation and messaging makes gameplay smoother and more responsive. Deployed the live version on a DigitalOcean droplet, so judges can access it directly without local setup through linerabet.online. Still supports running independently: the README includes step-by-step instructions (including the dockerized template flow) so anyone can reproduce the environment and run the project locally if needed.

Project Demo Link: linera.click

Video Link: https://drive.google.com/drive/folders/1BFz-2O0zYPTaB5-QTSA5N2ikKYrgQELg?usp=sharing More Details: README.md

## Wave 6 submission

This wave focused on maturing the Linera Casino from a prototype into a feature-complete and polished decentralized application. We significantly expanded the game logic, addressed critical feedback regarding stability, and completed a comprehensive UI/UX overhaul.

Advanced Game Logic: Implemented Double Down and Split functionality directly in the Rust smart contracts. This involved complex state management to handle multiple active hands and split payouts across Linera microchains.

Edge Case Hardening: Resolved several edge cases in the card-dealing engine and payout logic to ensure 100% accuracy in game resolution, even during concurrent requests.

UI Completion: Fully integrated the new actions (Double/Split) into the 2x2 action grid, including dynamic button states (disabled/enabled) based on valid game moves.

Refined Chip Placement: Improved the spatial coordinate system for chip placement on the Roulette table. Chips now align perfectly with betting zones (Straights, Splits, Corners), providing clear visual feedback to the player.

Aesthetic Polish: Completed all pending UI components from the previous round, ensuring a cohesive and premium-feeling interface across all resolutions.

Progressive Reveal System: Re-engineered the Baccarat interaction model. Instead of an instant "bet and wait" result, the game now reveals cards and scores gradually. This step-by-step sequence builds suspense, mirroring the tension of a high-stakes physical table and significantly elevating the UI/UX compared to the previous version.

Wallet Connectivity Fix: Fully resolved the "Connecting..." hang issue. By optimizing the wallet handshake and improving provider detection, the platform is now immediately usable and fully playable. Users can connect, fund, and play without any connectivity bottlenecks.

Smart Contract Audit: Conducted rigorous testing on the contracts to verify cross-chain message integrity and ensure the "replay-and-verify" mechanism is robust against fraudulent action reporting.

Live Demo: https://linera.click/

Video Demo: https://drive.google.com/drive/folders/13oPXggahP42ycPi5hDX13u0a_1OlkAXE?usp=sharing

## Wave 7 submission

Resubmission for the Bonus Round. No changes to the core codebase, features, or smart contract logic since the last wave. The only update is deployment/infra tuning on the DigitalOcean droplet (server + web stack optimizations) to improve page-load speed, stability, and support higher concurrent traffic.

The project can be accessed via the live deployment (linera.click) or run locally via Docker. The README includes step-by-step instructions (including the dockerized template flow) so anyone can reproduce the environment and run the project independently.

Deliverable links remain the same: linera.click

Prizes

  • Wave 3 grant · 359.32 USDC
  • Wave 4 grant · 476.47 USDC
  • Wave 5 grant · 321.43 USDC
  • Wave 6 grant · 575.41 USDC
  • Wave 7 grant · 138.46 USDC

From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

No public repo linked, so we can't tell.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

crosschain casino

Cross-chain casino dApp enabling seamless bets and payouts across multiple blockchains.