klaytn / klaytn-dapp-toolkit

MIT License
14 stars 34 forks source link

Proposal for a ZK-Game on Klaytn #20

Open nvq2309 opened 2 months ago

nvq2309 commented 2 months ago

The game is inspired by the Armageddon mode in Chess. Armageddon is a chess game mode in which the player who plays with the white pieces has more time on the clock, but in case of a draw, the player with the black pieces wins the game. The two players will have to bet for the time the will play, the player who bets the higher time will play the white pieces and the player who bets the lower time will play the black pieces. The player who bets the lower time will win the game in case of a draw. The game is played in a zero-knowledge environment, so the players will not know what the other player bet. The game is played in a zero-knowledge environment, so the players will not know what the other player bet.

In ZK-Bet, each player will bet a number in a certain range, the player who bets the lowest number will win but with the less bounty overall and the remaining bounty will belong to the game creator. But the special part is that nobody can know what other player bet, so the game is played in a zero-knowledge environment. When the bet duration is over, players will need to submit the proof that they participated in the game and the number they bet, and the number they bet will be revealed. The player who bet the lowest number will win the game and the bounty. If any player bets the same number as another player, the bounty will belong to the first player who submit the proof of the bet. After the game ends, the winner can claim the bounty and the rest will be transferred to the game creator.

Resources:

zxstim commented 2 months ago

Cool. Great idea. Approved for bounty. Will take a look at the deployments and revert back ASAP.