Base Paper Scissors
Play rock paper scissors on-chain, win ETH, be the house
Created on 1st July 2024
•
Base Paper Scissors
Play rock paper scissors on-chain, win ETH, be the house
The problem Base Paper Scissors solves
There is no premier wagering platform on base(and arguably the wider crypto ecosystem) that is truly decentralized. All other popular platforms use some kind of centralized component that makes it impossible to prove fairness and security. Base Paper Scissors offers a novel commit-reveal based rock-paper-scissors game that allows users to play games against other users on-chain, with the peace of mind of cryptographic security.
Challenges I ran into
We had a few challenges:
- Since all transactions on the blockchain are public, we had to figure out a way to let users commit to a 'hand' in a game without the ability to (1) change it afterwards, (2) back out of the game once they see the other player's hand. We solved this by implementing a commit-reveal scheme where users first commit to a game by submitting a hash of their hand + a secret phrase, and once both users have commited they will have to both 'reveal' by publicising the secret phrase and hand - which is then checked against their commit on-chain.
- We had to make sure to make the game engaging enough, even with the cumbersome UX of a commit-reveal scheme. We worked really hard to refine our frontend to make it animated, easy to parse, and generally fun to use. Its hard to say if we solved this problem or not, but we are pretty proud of what we made.
- There aren't any good indexing services that allow developers to listen to smart contract events in an easy and reliable manner. To solve this problem, we had to build our own block indexer that uses Coinbase's managed node solution.
Tracks Applied (1)
Gaming Track
GAMING with thirdweb
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
Discussion
Builders also viewed
See more projects on Devfolio
