Rush Games Architecture & Contracts
Last updated
Last updated
Welcome to the documentation for Rush Games deployed on the Sonic. This document provides an overview of the key components, including smart contracts, games, frontend, and external services integration.
The Rush Games dapp is built on a robust smart contract architecture that ensures a secure and transparent user experience. The central component is the Bankroll
contract, which manages the platform's funds, controls game activation, processes payouts, and provides administrative functionalities such as suspending and unsuspending user addresses when necessary. The contract leverages OpenZeppelin libraries for safe math operations and secure token transfers.
Each game in the Rush Games platform, including AstroSpin
, SpaceSweepDay
, Coinflip
, Dice
, and Slots
, inherits common functionalities from the Base
contract. This base contract implements standard operations like handling wagers, distributing payouts, and interacting with the Bankroll
contract for access control and managing fees associated with Pyth Entropy.
The individual games offer unique gameplay experiences and mechanics. AstroSpin
allows users to participate in a pooled game where a winner is randomly selected using Pyth Entropy. SpaceSweepDay
offers a game with multiple winners and tiered rewards. Coinflip
presents a simple binary outcome game based on coin toss results. Dice
enables users to engage in dice-rolling games with customizable multipliers. Slots
brings the classic slot machine experience with configurable reels and paylines.
To maintain fairness and integrity, all games in the Rush Games platform utilize Pyth Entropy for secure and verifiable random number generation. Pyth Entropy ensures that the outcomes cannot be manipulated or predicted, providing a trustworthy gaming environment. Users have the flexibility to customize their gaming sessions by setting parameters such as the number of rounds, target multipliers, and win/loss limits.
The smart contracts also incorporate robust safety mechanisms and access controls. The Bankroll
contract grants the owner the ability to suspend and unsuspend user addresses if any suspicious activities are detected. Each game contract includes contingency functions that allow the owner to refund all participants if necessary. To maintain the platform's financial stability, maximum wager limits are dynamically adjusted based on the current bankroll balance.
Bankroll Contract
Address: 0xDA320DCA7a9BC0acBB01cd2d94AB075e534F5313
Primary Function: Platform fund management and administrative control
Key Features:
Fund allocation
Game activation
User address management
Payout processing
Base Contract
Primary Function: Foundational logic for all game contracts
Inherited by all specific game contracts
AstroSpin Contract
Address: 0xC9ef011416F8C41D4Af80315eA00bf83250Fff9B
Game Type: Pooled Random Winner
Randomness Source: Pyth Entropy
SpaceSweepDay Contract
Address: 0xf08F1e41C9D0E4f045662845181858B84d6e9A31
Game Type: Multiple Winners with Tiered Rewards
Randomness Source: Pyth Entropy
Coinflip Contract
Address: 0x540C7c2289f37c594D0103E4bCcbc9228929ddBB
Game Type: Binary Outcome (Coin Toss)
Randomness Source: Pyth Entropy
Dice Contract
Address: 0x757A8618f346F4410c9c14eAEDa6DB9F35383451
Game Type: Custom Multiplier Dice Game
Randomness Source: Pyth Entropy
Slots Contract
Address: 0x7780b733875b0F5CF0a0A62A5f39175A4DF345Bb
Game Type: Classic Slot Machine
Randomness Source: Pyth Entropy
Video Poker
Address: -
Game Type: Card Game
Randomness Source: Pyth Entropy
Plinko
Address: -
Game Type: Pachinko-style Ball Drop
Randomness Source: Pyth Entropy
Rock Paper Scissors
Address: -
Game Type: Classic Hand Game
Randomness Source: Pyth Entropy
Mines
Address: -
Game Type: Grid-based Puzzle
Randomness Source: Pyth Entropy
Vault
Address: -
Type: Stake & Earn
RUSH Token Contract
Address: 0x0e346e34165c831018f98414caf2689d0d3aa3e6
Token Type: Utility Token
Key Features:
Staking
Revenue sharing
Platform Fee Token
Address: -
Purpose: Fee collection and distribution
RUSHONE NFT
Address: -
Purpose: Fee distribution
OpenZeppelin library integration
Pyth Entropy for verifiable randomness
Dynamic wager limit adjustments
Administrative suspension capabilities
Emergency refund mechanisms
All game contracts utilize Pyth Entropy to ensure:
Secure random number generation
Tamper-proof game outcomes
Transparent and verifiable results
Owner-level administrative functions
Ability to suspend/unsuspend user addresses
Contingency refund capabilities
Dynamic risk management
Note: Actual contract addresses will be updated upon deployment & Audit.