Skip to content

About

A real-time multiplayer musical chairs game on the blockchain, built with Go and Web3 technologies.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Musical Chairs on Web3

Game Banner

A real-time multiplayer musical chairs game on the blockchain, built with Go and Web3 technologies. This project is a showcase of a full-stack application featuring a Go backend, smart contracts on Ethereum, and a vanilla JavaScript frontend.

This repository serves as the main hub for the Musical Chairs project, including documentation, feedback, and bug reports.


▶️ Play Now

➡️ muschairs.com


📜 Table of Contents


🤝 Team & Contributors

Musical Chairs is a solo-developed project by Crow, built with the assistance of advanced AI.

  • Crow - Founder & Solo Developer
    • Designed and built the entire architecture: Backend (Go), Smart Contracts (Solidity), and Frontend (JS/HTML/CSS).
  • Gemini (AI) - Lead Technical Co-pilot
    • Wrote the majority of the code under Crow's direction, handling technical implementation across the full stack.
  • Zyrick - Web3 UI/UX Developer
    • Developed the wallet connection modal and contributes to UI/UX improvements.
    • X (@humblechigozie_) | Telegram: @zyrick_x | Discord: 0xzyrick

✨ Key Features

  • Real-time Multiplayer: WebSocket-based communication for instant game state updates.
  • Multi-Chain Deployment: Available on 11 major networks (Arbitrum, Base, Ethereum, etc.) with stakes ranging from $2 to $100.
  • Secure Authentication: Players sign messages with their wallets to join, no password required.
  • Zero-Friction Onboarding: Support for social login (Google, Apple, X) combined with ERC-4337 Account Abstraction. Learn more here.
  • Provable Fairness: Winner determination logic runs inside an Intel SGX Enclave, ensuring tamper-proof execution.
  • Referral & Promo System: On-chain referral tracking with Promo Codes that grant referees a 15% discount on fees.
  • Full Stack: A complete application showcasing a robust backend, interactive frontend, and secure smart contracts.

🔗 Official Links

To protect yourself from scams, please only use the official links provided below.

🔗 All Official Links (Linktree)

Play Ethereum
Ethereum
Base
Base
Arbitrum
Arbitrum
Arbitrum Nova
Arbitrum Nova
BNB Chain
BNB Chain
Polygon
Polygon
Optimism
Optimism
zkSync
zkSync
Testnet
Testnet
Community Discord
Discord
Telegram
Telegram
X (Twitter)
X (Twitter)
Farcaster
Farcaster
Bluesky
Bluesky
Zealy
Zealy
Damus
Damus
BitcoinTalk
BitcoinTalk
Stats & Info DappRadar
DappRadar
DefiLlama
DefiLlama
Dune Analytics
Dune
Crunchbase
Crunchbase
Code & Articles GitHub
GitHub
Medium
Medium
Dev.to
Dev.to
Blog
Blog
On-Chain & Contact Details
  • Smart Contracts Repo: https://github.com/crow-004/musical-chairs-contracts
  • Mainnet Contract (Arbitrum): 0xEDA164585a5FF8c53c48907bD102A1B593bd17eF
  • Mainnet Contract (Base): 0xEDA164585a5FF8c53c48907bD102A1B593bd17eF
  • Mainnet Contract (BNB Chain): 0xEDA164585a5FF8c53c48907bD102A1B593bd17eF
  • Mainnet Contract (Optimism): 0xEDA164585a5FF8c53c48907bD102A1B593bd17eF
  • Mainnet Contract (zkSync): 0xEDA164585a5FF8c53c48907bD102A1B593bd17eF
  • Mainnet Contract (Ethereum): 0x7c01A2a7e9012A98760984F2715A4517AD2c549A
  • Mainnet Contract (Polygon): 0x9880A2fcb9BE91051e337596a2b1a3091bF6d69C
  • Testnet Contract (Arbitrum Sepolia): 0x5Af9Ed30A64DB9ED1AE31e9c6D4215A9ED173040
  • Support Email: support@muschairs.com
Mirrors & Landing Pages

🚀 As Seen On

Musical Chairs is recognized and listed on the following platforms.

(More listings coming soon!)


🛡️ Open Source Commitment

In the spirit of Web3, we believe that trust is paramount. To ensure full transparency and allow our community to verify our code, we have open-sourced all smart contracts governing the game.

While the smart contracts are public, the backend and frontend source code remains proprietary for now to protect our unique implementation and business logic. We believe this hybrid approach provides the best of both worlds: on-chain trust and off-chain competitive advantage.


�️ Provable Fairness & Intel SGX

To ensure absolute fairness in determining game winners, we utilize Confidential Computing powered by Intel SGX. We have built a system where even the developers cannot cheat.

Step 1: A Trusted Judge (Remote Attestation)

The critical logic that sorts player reaction times and determines the winner runs inside a secure Enclave.

  • Isolation: The enclave is a hardware-protected memory region. Even the server administrator (root) cannot modify the execution or inspect the memory of the enclave.
  • Attestation: The enclave generates a cryptographic "Quote" (Report) signed by the Intel processor. This report proves that the running code matches the open-source code published in this repository.

Step 2: Blind Justice (Encrypted Clicks)

We've implemented End-to-End Encryption for player actions to prevent censorship or reordering by the backend.

  1. The frontend fetches the Enclave's Public Encryption Key (which is bound to the hardware attestation).
  2. When a player clicks, their action is encrypted on the client side.
  3. The backend receives an encrypted blob. It has no idea who clicked, only that a click occurred.
  4. Only inside the secure Enclave is the click decrypted and processed.

Step 3: Verifiable Verdicts (Signed Results)

Every game outcome is digitally signed by the Enclave.

  • Signature: The enclave signs the result (winners/loser) with an ephemeral private key generated inside the secure environment.
  • Public Key: The corresponding public key is bound to the Enclave's Attestation Report.
  • User Verification: Users can inspect the browser console (F12) to see the raw signature and public key, allowing for independent cryptographic verification that the result came directly from the trusted code.

The Final 0.01%: The Path to Perfection

We have achieved 99.99% fairness. The only remaining theoretical attack vector is a sophisticated kernel-level delay attack by the server admin. To close this final gap, our roadmap includes:

  • SmartNICs (e.g., NVIDIA BlueField): To timestamp packets in hardware before they reach the OS.
  • Physical HSM (YubiKey): To protect critical keys on bare-metal servers.

Source Code

The code running inside the enclave is fully open-source and available in the enclave-service directory.

Verification

You can verify the integrity of the game logic yourself:

  1. Click "Verify Enclave" on the game dashboard (Identity Verification section).
  2. Check the Report: The system will return a signed report containing the MRENCLAVE (hash of the code).
  3. Reproduce the Build: Developers can clone this repo, build the enclave image, and verify that the resulting hash matches the live server.

See detailed verification and build instructions here


�🛠️ Technology Stack

This project is built with a modern, containerized architecture to ensure reliability and scalability.

  • Backend: Written in Go, handling all real-time game logic, user sessions, and WebSocket communication. The source code is currently proprietary.
  • Enclave Service: Go service running inside an EGo (Intel SGX) container for secure winner determination.
  • Smart Contracts: Solidity contracts, deployed on an Ethereum-compatible network, manage the core game rules and funds. The contracts are open-source (MIT License) and have been verified on-chain. You can review the code in our contracts repository.
  • Frontend: Built with vanilla JavaScript, HTML, and CSS for a fast and responsive user experience.
  • Infrastructure: The entire application is containerized using Docker and orchestrated with Docker Compose, running behind an Nginx reverse proxy for security and performance.
  • Code Quality: SonarQube is used for continuous static code analysis to maintain high code quality.

🎮 How to Play

  1. Visit muschairs.com.
  2. Use the dropdown menu to select your preferred network (Base, Arbitrum, etc.).
  3. Connect your Web3 wallet (e.g., MetaMask).
  4. Click "Join Game" and follow the prompts!

🐞 Feedback and Bug Reports

Your feedback is highly appreciated! If you encounter a bug, have a suggestion, or want to ask a question, please open an issue on this repository.

When reporting a bug, please include:

  • A clear description of the issue.
  • Steps to reproduce the bug.
  • Your browser and wallet information.
  • Any relevant console logs or screenshots.

☕ Support the Project

If you enjoy the game and want to contribute to its development, you can send a donation to one of the addresses below. Thank you for your support!

  • EVM (ETH/BSC/Base etc): 0x02144a84Fbd686081f464E3edDAD5EE62632FeD9
  • Bitcoin (BTC): bc1q43h0xrgu6kfz37xjym96m69wllrrcxm8qj9ghy
  • Solana (SOL): F8YkBXie6cJBbjC3iddrywRRDng4VSrogkX7KGc84Wgc
  • Tron (TRX): TAMNeXoBorgCVy5SNXEW41mcNcmiB6bRun

⚖️ License

The contents of this repository (documentation, issues, etc.) are available for the community. The smart contract source code is released under the MIT License. The backend and frontend source code is proprietary and all rights are reserved.

About

A real-time multiplayer musical chairs game on the blockchain, built with Go and Web3 technologies.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages