Updated 139 days ago

Rock Scroll Scissors

Rock Scroll Scissors aims to leverage the power of ZKPs to offer a familiar game in a fun and transparent manner

Rock Scroll Scissors is a simple yet familiar game built on Scroll (who knew!). The game utilises zero-knowledge proofs to ensure that the classic game is played in a trustless and transparent environment.

How it works

A player creates a games by selecting a move (Rock, Scroll (aka Paper) or Scissors), an opponent's address, and an amount to bet on. Noir is then used to generate a proof, which is then verified on-chain to ensure compliance with the game rules without revealing the move.

The opponent can then join an existing game, by similarly selecting their move and providing an equal bet amount. Only now, the opponent's move is submitted on-chain in plaintext, as the game creator's move is already committed.

Thereafter, the game creator can then reveal the game results. This involves submitting the original move, which will then be verified against the hash that is stored on-chain. If there is a winner, the bet is awarded accordingly.

Verified Contracts

RockScrollScissors https://sepolia.scrollscan.com/address/0x9ba06b76a50363c689252a72c1078099f6a385c7#code

Verifier https://sepolia.scrollscan.com/address/0x44cfbe94cc15010c1ebf6829b16c2dfd343b6b17#code