Da'Chess reimagines the way you play chess by integrating it with web3, giving you the ability to stake MATIC tokens for games you play, and also allowing you to bet on ongoing live games, all of this while giving you a beautiful 3D Chess interface created from scratch. The user flow of Da'Chess has been made as simple as possible. Upon the first login, you will be prompted to connect your metamask wallet to Da'Chess. Your Wallet ID is the only identity that will be shared on the Da'Chess platform.
Eminent streamers like Vidit and Samay can choose to make their wallet ID public so people can join their streams from the lobby, or you can just keep it private if you are too conscious about your gameplay.
After Logging in, you have the option to start a 1v1 Match, join the Practice Arena or Bet on live matches. We also have a Chat feature. Players can chat with opponents as well as the viewers. Viewers can also send Superchats during a livestream that are distributed with both the players :))
At the end of the game, depending on the outcome, the winning player gets the money on the table. if the game is drawn, the staked MATIC is returned.
The bids will be executed at the end of the game depending on the game outcome.
As the player IDs are their Wallet IDs only, the viewers can also tip ETH to the streamers directly in their metamask wallet.
How are we handling payments?
All the staking and betting is handled by solidity smart contracts, which is a robust way of handling commitments on the Polygon blockchain.
Why did we use Polygon?
Due to the ubiquity and ease of use that comes with the Polygon Network, it was the ideal choice for this project. Solidity smart contracts work seamlessly with polygon, and with its large reach, it enables our platform to be used by a larger consumer base.
So, what are you waiting for?
Jump right into Da'Chess and start a staked chess game or bet on live chess players and experience the chess frenzy.
ReactThreeFiber is an abstraction of ThreeJS for React. However, due to the abstractions, some edge cases aren't handled in the library (like 3d components being deleted from React RenderTree). We had to come with Innovative solutions to prevent these edge cases from coming.
To ensure the sanctity of contracts, we have to ensure that the player himself cannot trigger a win condition on the frontend to maliciously get the stake amount. To prevent this, we have made an owner wallet on the backend and only that can sign the smart contract to send money to the winner. We think this is what sets us apart from other solutions.
Getting the WebSockets to work smoothly for the board changes to get reflected on all PCs was an uphill battle but with perseverance, all works smoothly now :))
Learning new technologies like solidity, ReactThreeFiber, metamask, tailwind was an engaging but fun experience.
Discussion