A Zero Knowledge Poker Protocol that is Game Theory Optmised
This project brings together zero-knowledge proofs, on-chain escrow, and a browser-based poker table to create a poker game you don’t have to trust anyone to run. Players buy in with PYUSD, which is held safely in a contract until the game ends. The cards are shuffled using randomness from the Pyth oracle and the classic Fisher–Yates shuffle, so every deal can be verified. Your hole cards stay private through zero-knowledge commitments and only get revealed at showdown with a proof that the contract can check. The gameplay itself follows real Texas Hold’em rules, with a bot opponent that plays close to Game Theory Optimised (Nash Equilibrium) strategy for practice. At the end, the contract pays out the winner instantly, taking a small protocol fee to keep things running.
This project is a trustless poker game built on zero-knowledge proofs and on-chain escrow. Players sit at the table by depositing PYUSD, which is held securely in a contract until the hand is complete. The deck is shuffled using randomness from the Pyth oracle combined with a Fisher–Yates shuffle, so every deal is provably fair. Hole cards remain private through zero-knowledge commitments and only get revealed at showdown, along with a proof the contract can verify. The gameplay itself follows classic Texas Hold’em rules, with a bot opponent that plays close to game-theory optimal strategy. At the end of each game, the escrow contract automatically pays out winnings in PYUSD, keeping a small protocol fee to sustain the system.
Under the hood, the setup blends several moving parts into one system. The contracts are written and tested in Foundry, handling escrow, proof verification, and randomness hooks. The circuits are built in Circom, proving that cards and shuffles are valid without leaking hidden information, with proofs generated in the browser through snarkjs and checked on-chain through a Solidity verifier. A lightweight Node.js server helps the game run smoothly, keeping track of state, pushing events over WebSockets, and even pre-computing proof witnesses to cut down on lag. On the front end, a Next.js app brings everything together with a clean poker table interface, wallet integration, and in-browser proof generation.
This architecture keeps the money on-chain, the cards private but verifiable, the gameplay responsive, and the user experience familiar — all the pieces working together to make poker provably fair.

