A privacy-focused implementation of the Matching Pennies exercise based on Compact Smart Contract development language.
This exercise tackles the challenge of implementing a simultaneous-commitment game on blockchain, where traditional transparency conflicts with the need for private decision-making. The game consists of two players picking a coin side and once both players have commited to the choice, later revealing if their decisions match or differ.
Despite the easy game explanation, due to the blockchain's nature of transparecy, the programmer faces with the architectural & algorithmic challenges of maintaining private information for the correct game development, while leveraging the language provided tools to achieve the task.
For a complete step-by-step explanation of the implementation, including:
- Development environment setup
- Cryptographic commitment scheme details
- Smart contract architecture
- Testing approaches
- Future improvements