The problem GHODA.crypto - Shatranj solves
HODL Your Horses
Shatranj is a one of its kind chess dapp. It brings together the legacy of chess and the ownership of web3 along with rewarding every winner with a UNIQUELY GENERATED AND MOST ARTSY CHESS NFT which can directly be sold on OpenSea.
Each NFT provides the users with a chance to claim a special piece skin. This skin can be used in-game to customise the pieces.
We believe that Web3 is about owning the facts. Players can own their pieces, NFTs and ELO ratings. What more does a chess-crypto enthusiast needs?
Users can stake their
GHODA
tokens and get
sGHODA
in return. The
sGHODA
token is used for betting in the prize pool and rewarding mechanisms.
- Players connect their wallet. Claim a few
GHODA
tokens from the faucet and stake them.
- Join the challenge pool for a quick match or create challenges for their friends. The winner will be automatically rewarded without signing a single transaction.
- Winners get to choose between
- Claiming the whole pool OR
- Claim the pool and get rewarded with a specially Generated NFT.
- These NFTs are depiction of all the sacrifices made by the players and records the game as a colourful story in a PNG. These NFTs are available on OpenSea and an in-app marketplace to trade.
- We host cloud functions on Moralis which provides a tamper proof Web2-3 solution for crypto-login and auth methods. With Moralis handling the authentication burden, we focus on bringing back the ownership to the users.
- We use Moralis to trigger an Oracle (Deployed on StackOS) that calls the smart contract functions for starting and ending the games.
- Stakes are locked, game is played off-chain and on the Cloud. Then submitted to the Oracle which generates NFTs and mints them if the user wants it. Oracle submits the game to the distributed ledger and now the user owns their game. On-chain and off-chain.
We provide a seamless user experience and all the cool and lucrative benefits of Web3 and true ownership
Challenges we ran into
Challenges, Ideas and Sacrifices
Chess dApp sounds an easy task to pull off. Here are some of the ideas we came up with. The check box denotes if we iterated over the idea. We progressed a lot very quickly but to out surprise, we had to take a lot of steps back to create something very sustainable and yet true to the principle. We also had to stick to a fixed bet for the timebeing. It is very difficult to decide fair ratings and scores when currency is at stake.
✅. Ahead of its Time
- We create a client that generates random proxy accounts for users which can be used to sign the messages without a popup using
web3.accounts.sign
.
- These proxies would be submitted to the smart contract for a game session by a centralised oracle and now, both players can send and verify the moves on the client (off-chain). The moves and board state will be sent to the smart contract at the end of the game by the player who wants to claim the victory. Keeping in mind the noonces to stop replay attacks.
- Now, we do remove the trust factors between both players, but there needs to be dispute resolution methods on the smart contract. The disputes would be very difficult to track on-chain, where real-world time is disregarded.
- We were successful in coding the smart contracts for verification of the game on-chain (without a lot of gas).
- But this method still relies on a centralised oracle that would submit the proxies to the contract. Hence, we had to let go of this idea until web3 matures enough to support decentralised cloud computation to its full extent.