project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

ETHGambit

A superior, decentralized alternative to online chess betting.

ETHGambit

Created At

ETHGlobal San Francisco

Winner of

Flow - Best Sports App on Flow

Flow - Best Developer Feedback

Project Description

The act of "hustling" is a core part of chess culture. In big cities like New York and Boston, chess hustlers hang out in the park and play strangers, each putting down a small wager on the winner of the game.

A single online service, chesshustleonline.com, attempts to capitalize on this tradition. On this website, 10% of each player's bets are taken as a fee. You don't get to decide how much to bet, which chess platform is used, and must wait 5-7 business days for your winnings.

However, ETHGambit can completely circumvent all of these downsides. Using blockchain technology, users can take back control of this timeless tradition, tapping into an extremely large market of approximately 110 million users that were previously priced out and sketched out by the status quo.

Overall, an intuitive UI combined with a solution alleviating a major pain point in the market will make a big splash in the online chess community, onboarding many enthusiastic users into web3.

How it's Made

The blockchain technology used in ETHGambit is a Solidity smart contract originally deployed on Polygon, but switched to Flow. The Polygon Amoy Testnet had about a 50% percent chance of throwing a random "Internal JSON-RPC Error" when interacting with the contract, which contributed to much frustration. The Flow Testnet did not have these issues.

The contract acts as an escrow with three main functions:

  1. createAgreement, which takes two wallet addresses and the amount being wagered.
  2. deposit, which players use to deposit agreed amount into the escrow.
  3. complete, which receives a signal from a lichess.org API that determines the result of the game. If the game is drawn, both get a refund; in the event of a victory, the associated wallet address is transferred the escrow.

An additional part of the back-end is a Python Flask server that grabs the result of the game. To make it more decentralized/trustless, we would use an oracle in the smart contract instead of a central server, which is the next step for this project.

The front end was originally planned to be a browser extension, however, we shelved that for the purposes of technical capability demonstration. The UI is built with ReactJS that imports modules like ethers and web3 to pass values to the smart contract.

background image mobile

Join the mailing list

Get the latest news and updates