Skip to content

A library that enables to create provable play-by-email games, leveraging Zero-Knowledge proofs.

Notifications You must be signed in to change notification settings

MatteoMer/provable-email-game-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provable email game engine

This project is a library to create provable play-by-email games, leveraging zero-knowledge proofs.

We provide an example project: a provable chess game played via email.

This project is work in progress and might not work as expected. I still need to polish the code.

Key features

  • Provable gameplay: Ensures players are honest by using zero-knowledge proofs.
  • Trustworthy: Game servers cannot cheat, and players can play against dishonest opponents with confidence.
  • Onchain settlement: Settle your game on the Hylé chain at low cost and without latency.

Learn more:

How it works

Architecture

Step-by-step

  1. Challenge a friend to play chess by email.
  2. Send each other emails with your chess moves, cc’ing the zkChess referee server on your emails.
  3. Using zkEmail and RISC Zero, the referee server generates two proofs:
    • zkEmail generates proof of the state transition sent by email.
    • The shakmaty library + RISC Zero allow for easy proof generation that the final email includes a mate.
  4. Hylé verifies and settles both proofs in a single transaction without requiring the proofs to reference each other.

Components

  • 2 players sending each other emails
  • A chess engine processing the emails to find the winning condition
  • A referee server receiving emails and generating the final zk proofs
  • Hylé to verify and settles the final proofs

Future improvements

Planned

  • Clean up code

Ideas

  • Add privacy (commit-reveal schemes)
  • Add more play-by-email games
  • Onchain side bets
  • Provable onchain ELO
  • Censorship-resistance of the email server

How to install and run

TODO.

Sponsor

This project is supported by Hylé, the lean blockchain for your provable apps

About

A library that enables to create provable play-by-email games, leveraging Zero-Knowledge proofs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published