This is a basic version of Three Card Poker built on Geometry Research's Mental Poker Protocol for submission to Harvard's Disrupt Hackathon (Dec 4-5, 2022).
The underlying protocol uses zero knowledge arguments to prove the validity of a shuffled deck, allowing for fair and trustless play of any card game with unknown participants. Future directions include:
- Creation of a UI for the games.
- Optimizations for zero-knowledge arguments using recursive SNARKS to improve verification latency.
- On-chain implementation of the above game using smart contracts to ensure the trustless settlement of bets and provably fair game set-ups.
- Expansion to other card games like Texas Hold’em, blackjack, etc.
Short 10 Minute Presentation Video
Excerpts of their README are below:
The library implements the mental poker protocol described in Mental Poker Revisited.
The protocol depends on an elliptic curve, without further requirements such as high 2-adicity of its scalar field or being pairing-friendly. This allows it to run in diverse environments, such as L2s and SNARKs.
A series of posts explaining the protocol and our approach to implementing it are available in the Geometry Notebook. Part 1 covers the protocol and primitives from a high level, Part 2 goes into some of the math.
This library is developed as part of the collaboration between Geometry and Matchbox, and is designated as Geometry - MatchBox Proof 1.
A script running a round of Three Card Poker is provided under mental-poker/barnett-smart-card-protocol/examples/round.rs
. Run the example by running:
cargo run --example round
© 2022 Geometry.
This project is licensed under either of
at your option.
The SPDX license identifier for this project is MIT OR Apache-2.0
.