We created a trustless mechinism to play the original game of POGS using ERC721 tokens on the Ethereum Blockchain.
What it does
Our application Enables users to collect and play POGS on the Blockchain. A user can challenge any other player on the Ethereum blockchain to a game of pogs by proposing a stack of their Cryptogs to play with. Following a challenge from player 2, player 1 can accept the challenge and a coin toss is preformed to determine which player will throw their slammer first. Coin flips are enabled by a commit-reveal scheme on chain to enable a trustless interaction. At the end of the game, each player wins the POGS that they were able to flip - just like the original game you played while watching Saved by the Bell and drinking Surge.
How we built it
Our team of 4 coordinated efforts to create Solidity contracts, test the contracts, design the UI and implement the front end with each team member contributing along the way.
Challenges we ran into
Time! Simplification of smart contract transactions, and connecting the UI to the backend smart contracts. There was a lot of learning along the way while developing.
Accomplishments that we're proud of
Working together and creating something from scratch. We also managed to extend functionality of the ERC721 tokens by handling multiple transfers and interactions of multiple tokens. Designing a commit-reveal scheme to play the game. And most importantly, creating a fully decentralized application.
What we learned
Contract and UI design need to work closely during development to understand how to simplify transactions and better user experience. We learned how to implement and manipulate ERC721 tokens. In addition, we thought through how each POG represented a different value and how challenging players to different games required an understanding of that value so that equal risk could be shared by both players in the game. Also, although the main project is not in Truffle, we did use the frame for testing and checking migrations.
What's next for Cryptogs
Mainnet token distribution and UI interoperability with the contracts