Peer2Play WhitePaper
  • πŸ“œIntroduction
  • β›”Problem Statement
  • πŸ› οΈSolution
  • 🎯Mission and Vision
  • ⚑Key Features
    • Game Tokenization
    • Developer On-Boarding
    • Player-Driven Ecosystem
    • Transparent Revenue Sharing
    • On-chain Tournaments
    • Tokenized Economy
    • Cross-Chain Integration
    • Governance and Incentives
      • GameDAO
      • Incentives
    • Co-Ownership Model
      • Tokenized Games
      • Buybacks and Burns
  • πŸ€–AI Agents
  • Games
    • βœ‚οΈPunk Paper(LIVE)
    • 🏏Decentralized Cricket League (DCL)(LIVE)
    • πŸ‹οΈChain Duel(Coming Soon)
    • πŸ•ΉοΈUpcoming Games
  • 🧩Use cases
  • πŸ’«Getting started
    • Game Developers
    • Influencers
    • Gamers
  • πŸ‘¨β€πŸ’»Technical Architecture
    • MPC Wallet
    • Smart contract Architecture
      • Peer2PlayGenericStakingContract
        • Chess
        • Poker
        • Ludo
      • Peer2PlayGenericNonStakingContract
        • 1. Role-Playing Game (RPG)
        • 2. City-Building Game
        • 3. Farming Simulations
      • Tokenization & Revenue distribution
    • SDKs & APIs
  • πŸ”Compliance & Security
  • ❓FAQ & Troubleshooting
  • 🀝Connect with Peer2Play
Powered by GitBook
On this page
  1. Technical Architecture
  2. Smart contract Architecture
  3. Peer2PlayGenericStakingContract

Chess

(2 Players)

Match Flow:

  1. Game Creation:

    -Admin calls addGame with gameUid and metadata.

    -Game owner sets gameFee using updateGameFee.

  2. Match Creation:

    -Player 1 calls createMatch with game UID, stake amount, and max players = 2.

  3. Player Join:

    -Player 2 calls joinMatch, providing the staking amount.

  4. Game Execution:

    -Players compete in an off-chain chess match.

  5. Result Submission:

    -Winner’s address is submitted by the game owner via submitMatchResult.

  6. Reward Distribution:

    -Winner receives stake minus protocol and game fees.


2. Poker (4 Players)

Match Flow:

  1. Game Creation:

    -Admin adds Poker as a game via addGame.

    -Game owner sets a 5% fee using updateGameFee.

  2. Match Creation:

    -Player 1 calls createMatch with game UID, stake amount, and max players = 4.

  3. Player Join:

    -Players 2, 3, and 4 join sequentially by calling joinMatch.

  4. Game Execution:

    -Off-chain Poker match is conducted with all players participating.

  5. Result Submission:

    -Game owner submits the result via submitMatchResult, specifying the winner or winners for tiered rewards.

  6. Reward Distribution:

    -Staking rewards are distributed among winners, with protocol and game fees deducted.


3. Ludo (4 Players, Private Match)

Match Flow:

  1. Game Creation:

    -Admin registers Ludo via addGame.

    -Game owner sets metadata and fees.

  2. Match Creation:

    -Player 1 creates a private match using createMatch and provides a cryptographic hash of authorized player addresses.

  3. Player Join:

    -Players 2, 3, and 4 call joinMatch and provide matching authorization data.

  4. Game Execution:

    -The Ludo match is conducted off-chain among the participants.

  5. Result Submission:

    -Game owner submits the winner via submitMatchResult.

  6. Reward Distribution:

    -Staking rewards are distributed to the winner, with protocol and game fees deducted.

PreviousPeer2PlayGenericStakingContractNextPoker

Last updated 4 months ago

πŸ‘¨β€πŸ’»