♠️
RACE Protocol
NFT PresaleDiscord
  • ❤️Official Docs & Links
  • ⏳Progress Overview
  • RACE Protocol
    • 🏗️System Architecture
      • Components
      • On-chain Accounts
      • Synchronization
      • Randomization
      • Payment
    • 🎲Game Development
      • Game Handler
      • Effect
      • Event Handling
      • Race API
        • Arweave Integration
      • Race JS SDK
        • Installation and Setup
        • Key Components
          • AppClient
          • SubClient
          • Events
          • Game Context
          • Decryption Cache
        • Advanced Features
          • Getting Revealed Knowledge
          • Exiting and Detaching
          • Submitting Messages
          • Sub-game Interaction
        • Best Practices
        • API Reference
        • Troubleshooting
    • 🧪Testing
      • Race Test Kit
      • Unit Testing
      • Integration Testing
      • Additional Considerations
    • 🧱Modules & Features
      • Encryption Methods
      • Command-line Tools
      • Configuration Options
      • Blockchain Transport Implementations
    • 📃Smart Contract
      • Solana Program
    • 🔦Examples and Use Cases
      • Draw Card Game
      • Raffle Game
      • Other Examples
  • RACE Games
    • ♠️RACE Poker app
      • 🎮Start playing in minutes
        • 💰Cash and sit-n-go
        • 🏆Tournaments
      • 🎨Workshop
        • 🏆Create cash games
        • 🏨Create tourneys
      • 💡Concept introduction
      • 🏗️System architecture
      • 👾Game Flow
      • 🎲Cards shuffling
      • ☎️Communication
      • 🔐Key sharing/decryption
      • 💱Cash flow structure
    • ⚡Solfast
      • 🎲Game modes
  • RACE RESEARCH
    • 👾No-Code Development
      • Brainstorming
      • Implementation Approach
      • Project Status
    • 0️⃣Zero-Knowledge Proofs
      • Brainstorming
      • Integration steps
        • Verifiable Randomness Generation
        • Private Game State Updates
        • Verifiable Settlements
        • Private Player Actions
      • Project Status
    • 🛡️Security Audit Report
      • Executive summary
        • Introduction to Race Protocol
        • Audit Methodology
      • Findings
        • Smart Contract Security
        • WebAssembly Security
        • Client-side Security (Race SDK)
        • Server-side Security
        • Randomization and Encryption
        • On-chain Account Management
        • Synchronization Mechanisms
        • Payment Handling
      • Recommendations
      • Conclusion
  • RACE DAO
    • 😎About
    • 🫂Community
    • 🖼️NFT Collection [!]
Powered by GitBook
On this page
  • Communication process
  • Settlement
  • Community Governance
  1. RACE Games
  2. RACE Poker app

Communication

RACE Poker's

Transactors relay game data from one client to another (as commonly seen in WebRTC). The data is encrypted by players before being sent, hence not visible to transactor.

1. ED25519

2. AES-CTR

3. RSA

Communication process

When a client A needs to share a card key to player B without revealing it to other players, it reads RSA public key from player B's blockchain account and encrypts the message using it.

Player A sends the encrypted data to player B via Transactor marking:

[SENDER, MESSAGETYPE, MESSAGEDATA, RECEIVER]

Transactor does not know Player B's private part of RSA keypair, so it cannot know the card.

Player B receives the message via transactor & decrypts it with his RSA private key.

What if client loses its RSA private key?

When joing a table client checks his ability to decrypt messages with RSA keypair.

What if malicious client doesn't provide its keys?

This situation is hard to handle since there's no way to distinguish between "someone didn't provide the key" and "someone received the key but he lied". So the governance from community or official team is necessary in this case. Considering the nature of the Texas Hold'em poker and the game will be shutdown when anything is going wrong, it is not cost effective to gain by breaking the game.

Settlement

The transactor will commit the game result to solana program, the program will transfer chips among players. All client will know the result once the transaction is succeed. If a client find the game state is incorrect, it will send a transaction to lock the game, and seek for help from the community.

Community Governance

There are several cases when a exception happen.

The community governance are necessary since there are cases that clients can not reaching consensus with themselves. For example, the consensus is impossible when there are only two players in a game. The programs will only work without governance when there's no malicious client. When things going to an unexpected state, client can choose to send transaction to lock the game.

PreviousCards shufflingNextKey sharing/decryption

Last updated 2 years ago

♠️
☎️