FAQ & Risk Disclosure

Question 1: What is the role of the Hydra Bridge in this game?

Answer: The Hydra Bridge is an intermediary library that enables seamless interaction between the client UI and the Hydra Head through pre-built functions such as connection handling (connect, disconnect) and transaction operations (bridge.newTx, newTxSync, init(), abort(), etc.). This simplifies the integration process for web developers, ensuring a smooth and efficient user experience on the interface.


Question 2: How does the game ensure fairness during the REVEAL phase?

Answer: Fairness is ensured through cryptographic commitments. During the COMMIT phase, players submit a hashed version of their move. In the REVEAL phase, they disclose their original move and encryption key. The game then uses RSA verification to check if the revealed move matches the previously committed hash, effectively preventing any cheating.


Question 3: What happens if a player fails to reveal their move on time?

Answer: The game implements a timeout mechanism. If a player does not reveal their move within the specified time (e.g., T_r), the game may automatically consider that player as having lost the round or apply a default rule to ensure the game continues without interruption.


Question 4: How does the payment process work in the game?

Answer: After determining the winner based on the game rules, the losing player creates a payment transaction to transfer the bet amount (e.g., 5 ADA) to the winner. This transaction is processed quickly via the Hydra Head, ensuring instant payment.

Question 5: What role does WebSocket play in the game?

Answer: WebSocket provides a real-time connection between the game application and the server. It instantly updates the game state, such as when players join a room, submit moves, or when the game transitions between phases (e.g., from COMMIT to REVEAL).


Question 6: Why does the game require multiple Hydra Nodes?

Answer: Multiple Hydra Nodes are used to distribute the workload and ensure redundancy. This enhances the game’s reliability and scalability, allowing it to support multiple players and rooms simultaneously without compromising performance.


Question 7: What are the benefits of using Hydra instead of the main blockchain?

Answer: Hydra offers faster transaction processing and lower costs, which are crucial for real-time applications like games. It enables immediate responses and interactions, improving the user experience compared to the slower confirmation times on the main blockchain.


Question 8: What do the game states (IDLE, COMMIT, REVEAL, PAYOUT, FINALIZED) represent?

Answer: These states represent the stages of a game round:

  • IDLE: Ready to start or just finished.

  • COMMIT: Players submit their moves.

  • REVEAL: Players disclose their moves.

  • PAYOUT: The winner is determined, and the bet is transferred.

  • FINALIZED: The round is complete, ready for the next round or to end the game

Last updated