ChessFX

ChessFX

  1. Number of $FX requested (incubator fund): 80000 $FX;

  2. Proposal belongs to which segments: Developer Fund;

  3. Incubator fund distribution timeframe and milestones.

    • Distribution timeframe: 80k ideally across 6 months.

    • Milestones:

      • 1st stage - 10k $FX - 1st month - initial development, plan and architecture (encoding chess board and other challenges), setting up test environment
      • 2nd stage - 10k $FX - 2nd month - encoding flow of chess movements between contract instances for 2 parties, adding rules, time limits, code optimization, basic functionality
      • 3rd stage - 10k $FX - 3rd month - bids, reward pool logic, contract or backend validation of chess board and moves, penalties for invalid moves, web library and some interface to interact with
      • 4th stage - 10k $FX - 4th month - smart contract code deployed and ready for testing by users on testnet, initial testing, fixing issues and inconsistencies, bug fixes
      • 5th stage - 10k $FX - 5th month - solving final challenges, optimizing smart contract (to cost less, especially heavy calculation functions), finalizing for production, backend service, bug fixes, and edge cases
      • 6th stage - 10k $FX - 6th month - deployed on mainnet, users can test and report any issues, inconsistency fixes, web interface improvements
      • extra 20k $FX - cloud and server costs, backend services, domains, docs and other resources, extra risk for the unknowns and bugs.

      Notes:

      • Estimation for each month (20 working days) is based on ~500fx/day (dev/team and to cover other IT costs).
      • The overall cost is based on the predicted complexity of the project. There are so many challenges and scenarios to solve.
  4. Proposal details.

    • Name of the proposal: ChessFX (short for Chessmaster FX)

    • Description: Chess game that can be played by both parties with an initial equal bid. Winner gets rewarded.

      Details: Two users decides to play chess (their game state is tracked by a smart contract). There is an initial cost requirements to start a game (a bid), then each user submits their next moves. The winner wins the total reward sum of ~198% (minus 2% maintanance fee).

    • Mechanics: Game can be played via web interface which interacts with Chess smart contract receiving and updating the state of the game. Each player move creates a separate contract instance (by sending encoded chess board or by updating figure positions). Wrong moves are going to be rejected (we could have some penalties). At the end of the game, the winner is rewarded. In case of a tie, reward is split equally.

    • Questions:

      • What time limit should be specified between the moves? Should initial user decide and specify the limit (in minutes) according to their skills?
      • If each player’s move cost gas, how much the total game is going to cost (short vs long games)? So users should take into the account the initial bid to be higher (to cover the total network fees).
      • Should we add option to allow people undo their last moves for extra tokens, increasing the reward pool (could be approvable by the opponent)?
    • Challenges:

      • Validating each move or a game’s end (whether king is in checkmate or in stalemate) can be too costly for the smart contract to run. This should be optimized or be outsourced for the backend service which should be validating each moves and scanning for the end game scenarios. Can we code it using a smart contract? We’ll see.
      • Are we going to have cheaters by copying moves from the computers? Should we worry about it? Definitely nobody wants to play with some Deep Blue. Maybe some captcha to solve between some random moves? Another workaround could be to create some kind of player statistics, so weaker players can avoid 100% winners. And 100% winners would love to play with other 100% winners for the higher bids. But then what if 100% winner (strong player) will accept the game from 50% winner (weaker player)?
      • I did initial research and some team of students tried to implement chess for ethereum few years back, but it was reported that contract/block processing (each move) was very expensive and taking too long (let’s hope FX can fix it). Check the following blog for more details: Lessons learned from making a Chess game for Ethereum | by Paul Grau | Medium
      • Should smart contract be validating the right moves and states at the cost of contract? Or backend service should be validating it? Or give opponent ability to report invalid moves (to save costs), however, we can trust him?
    • Proposed features (optional at the later stage):

      • Leadership published on the website (statistics like number of games played, best players based on their public addresses and names, and so on). So people could choose their games more wisely according to the player level (so weak players may decide to avoid 100% winners).
      • Tournaments, like 16 people plays with each other (each with 100 $FX entry), then the winner gets the whole reward (~1600 $FX).
    • Benefits to F(X) ecosystem: It can be beneficial for both participants and contract owners.

    • Team: kenorb (kenorb (Rafal W.) · GitHub & User kenorb - Stack Overflow) and team.

      With over 30 years of software engineering experience, I specialize in variety of technologies, programming, tooling and delivering complex projects.
      I’ve been working for large enterprise companies, including a decentralized blockchain company for the enterprise clients across the globe.
      My recent personal project includes free and open source Forex trading robot which was developed across many years.

  5. Reasons why the project should be selected and supported and included an analysis of the competitive landscape;

    Reasons:

    • Open source code smart contract and free to use by anybody.
    • People can get paid for their chess skills.
    • Transparent progress during stages.
    • Once this project is implemented and challenges are solved, can be expanded to other games such as Go, etc.

    The proposed project is more competitive, because:

    • FX blockchain can be more suitable for this game, more competitive comparing to others (such as Ethereum) where the game could be much more costly.
    • It’s decentralized, no relying on 3rd party games or websites being down.
    • Users are rewarded for being smart and their skills by playing a chess game.
    • Rules and rewards are protected by the smart contract code.
    • Nobody can shut down the service, cheat or take the tokens away.
    • Transparency of reward logic due to open-source code.
    • Due to open-source nature of the code, anybody else could verify the code or use it to deploy the contract for themselves.
  6. Include attachments, such as GitHub links, product prototype, video, planning, blueprint, twitter, etc.

  7. Additional information;

    Scenario 1:

    • Alice creates a chess game instance with a bid 100 $FX with her first move starting with figure color of her choice (this creates a first contract). People starting a new game can decide on the initial proposed bet amount and color of their figures.
    • Bob accepts the game by sending his move as the response to Alice with 100 $FX (he creates 2nd contract which got the reference to the Alice first contract).
    • Reward pool is 200 $FX.
    • After Bob accepted a game, the contract locks this game for only these 2 participants. If anybody else who sent anything after the Bob’s move, $FX are added to the reward pool as extra reward.
    • Alice needs to response with her next move within X amount of time (5min? 1h? 24h?).
    • Same for Bob, who needs to response with his next move after Alice completed her move.
    • At the end of the game, the final Bob’s move result in the checkmate of his opponent and he wins the game (end game validated by the algorithm).
    • Bob can request the reward of 196 $FX (-2% maintanance fee).

    Scenario 2:

    • Same situation as above, but final move result in stalemate.
    • Both parties can claim 148 $FX back (-2% maintanance fee).

    Scenario 3:

    • Alice creates a chess game instance with a bid 100 $FX (as white).
    • Bob accepts the game by sending his move (as black) as the response to Alice with 50 $FX.
    • Since bid sent is not equal to Alice bid, smart contract rejected Bob’s move (and awaits for further bids). Normally this shouldn’t happen via the web interface due to frontend validation.
    • Smart contract now awaits for another valid move from blacks, this time with 50 $FX left (this logic to be clarified).
    • Bob accepts the game again by sending his move (as black) as the response to Alice with 100 $FX (not knowing he could send only 50).
    • Reward pool is 250 $FX.
    • The winner gets the entire reward pool (-2% maintanance fee).
    • In case of stalemate, sum is split equally.

    Scenario 4:

    • Similar situation as above.
    • In the middle of game, Bob didn’t respond with his move within agreed X amount of time (5min? 15min? 24h?).
    • Alice can claim the reward after the deadline (and she’s announced as a winner).

    Scenario 5:

    • Alice creates a chess game instance with a bid 1000 $FX (as white).
    • Nobody responded to the game within a deadline as the bid is too high for some (e.g. within 24h).
    • Alice can claim her original bid back (minus fees) after the deadline.

    Note: Above scenarios are not finalized yet and the logic and interaction can be adjusted along with more research and time spent based on the known possibilities and limitations of the smart contract.

  8. Licensing: MIT or GPL (open to suggestions).

    Included open-source code: smart contract code, JS library (if required) required for the website. Access to code will allow people to deploy their instances of smart contracts and verify the game logic.


Do not delete this part
Disclaimer: This poll is just a tool to get the sentiment around this proposal and it will NOT affect on-chain voting in any way. If your proposal is getting a good sentiment around the community, it might signal that the proposal is good to go to the next phase, otherwise, some modifications might be necessary.

  • YES
  • NO

0 voters

11 Likes

Wow another interesting proposal. Because of the drama - Queen’s Gambit, i’m pretty sure a lot of people would love to play online chess and there is even a stake on the line.

Cool stuff.

Sounds fun, maybe some sort of tournament could also be organized once in a while with a small entry price. Top 4 will win with prices from the entry price pool and ofc the fame as ChessFX champion for 1st place. More participants means a bigger pool and bigger rewards.

2 Likes

This is very interesting, great!
Proposal is very clear written and understandable.
A “yes” for chess from me.

I am sure it’s an entirely different scope of programming but still in line.

Add Go to this and we tap into a absolutely huge competitive group.

1 Like

I have some noob question(s).
The proposal leans much on smart contracts.

  • to start a game
  • validate game moves

Is that something that is already supported by the f(x)Core?
Or is that to be developed yet?
Or will chessfx use some other smart contracts?
(Is that what you mean with the outsourced contracts)

Is a smart contact for starting a game the same sort of smart contract as validating game moves?

1 Like

The proposal leans much on smart contracts (to start a game, validate game moves).
Is that something that is already supported by the f(x)Core? Or is that to be developed yet?

That’s the main purpose of EGF (Ecosystem Genesis Fund), to ‘encourage developers to create DApps on the Function X blockchain’. And smart contracts are basically essential part to make it work. The f(x)core blockchain code and smart contract APIs is yet to be released, so the project assumes it will provide similar functionality comparing to the other similar blockchains. The project aims at support for f(x)core only (unless code can be compatible or adjusted to other as well).

Basically smart contracts make your apps more resilient comparing to centralised solutions (such as database), so it can’t be shut down and game cannot be cheated. It basically creates a permanent record of the game state (like starting or saving the current state of the game, announcing the winners or for future game analysis).

Thanks for your reply, clear now for me.

Hello @This_Dutch_guy - And around those top 4 players create a “ChessFX team” which then compete against other Crypto-communities-teams (which also consists of 4 players) in a competition (via registration fee). A kind of “Major League Gaming for Teams” but for Chess Teams with a Grand Chess Final & a Great Prize (through sponsorship) at the end - Greetings Belgiumguy🇧🇪

1 Like

Maybe you are interested in ChessFox :slight_smile: and we combine our projects :wink:

I think the current importance of FXCore is in this order.

FXCore Web-based Wallet - This is the most important since it will act like metamask and be able to connect to different dApps on built on FXcore.

FXCore Games / NFT - Currently, the biggest trend in the crypto space is NFT + Games.

Example: Axie Infinity

Like your ChessFX, maybe you can introduce a set of customized made Randomized Rare Chess Pieces NFT that people are able to generate while playing.

Not sure how to implement it but it is similar to "breeding" in Axie Infinity or other upcoming games.

People being able to “feature” their rare chess pieces as avatars or be used in game for the sake of appearances. Not pay2win, purely for appearances sake only, like dressing up / flex.

Something like Dota 2 Arcana or Maplestory’s dress up game.

3 Likes

Related: Intern project: 2-player chess dapp