The Time-Travel Trading Game is an innovative blockchain-based game that allows players to "time travel" to different periods of Bitcoin's history to trade. Using real historic Bitcoin price and market data, this game simulates past market conditions, offering a unique and educational trading experience.
- Time travel mechanics to different periods of Bitcoin's history
- Real historical Bitcoin price data integration
- Smart contract-based game logic using Clarity language on the Stacks blockchain
- Player balance management and trading simulation
- Competitive gameplay aiming for the highest returns across different historical periods
- Blockchain: Bitcoin (for historical data) and Stacks (for smart contracts)
- Smart Contract Language: Clarity
- Data Source: Historical Bitcoin price and market data (to be integrated)
The game's core logic is implemented in a Clarity smart contract with the following main components:
-
Constants:
- CONTRACT_OWNER: The address of the contract deployer
- Error codes for various contract operations
-
Data Variables:
- current-time: The current timestamp in the game
- player-balances: Mapping of player addresses to their balances
- historical-bitcoin-prices: Mapping of timestamps to Bitcoin prices
-
Key Functions:
- time-travel: Allows setting the game's current time
- set-bitcoin-price: Sets historical Bitcoin prices
- get-bitcoin-price: Retrieves Bitcoin price for a given timestamp
- initialize-player: Sets up a new player with an initial balance
- get-player-balance: Retrieves a player's current balance
(Note: This section will be updated as the project progresses)
- Clone the repository
- Install the Clarity SDK and Stacks blockchain environment
- Deploy the smart contract to a Stacks testnet
- Interact with the contract using the provided functions
- Initial setup and basic contract structure (Current stage)
- Implement advanced time travel mechanics and paradox prevention
- Integrate real historical Bitcoin data
- Develop trading functionality and market simulation
- Implement game scoring and competitive elements
- User interface development and game flow refinement
Contributions to this project are welcome. Please ensure you follow the coding standards and submit pull requests for any new features or bug fixes.