An on-chain Poker Game ensuring privacy, transparency, and trust within online gaming by using fully homomorphic encryption.
The project implements a multiplayer poker table, with the game logic and state being stored completely on-chain. Using fully homomorphic encryption guarantees that aspects of the game state, such as initially face-down cards or cards of other players, cannot be viewed before it is allowed by the rules.
CryptoHold’em builds on Fhenix for the smart contract, Nouns DAO for icons/design, and React; the entire game logic is implemented in the Poker.sol smart contract. For demo purposes, the poker hands are simplified a bit but can easily be extended at a later point. Connecting the frontend to the smart contract functions is done via Metamask. The FHE (Fully Homomorphic Encryption) aspect is used to encrypt the set of in-play cards while they should be hidden. Any player can view their cards plus any revealed tabletop cards while the game is running; after the showdown all (still participating) hands can be viewed by everyone.