Validate all blocks without bugs in this fully on-chain game
Prize Pool
This game is an on-chain implementation of a game similar to the well-known "minesweeper" game.
In a field of blocks you have to validate blocks, avoiding the ones that contain bugs. When you click a buggy block, you lose. When you validated all blocks without bugs, you win.
The game is run fully on-chain (Arbitrum Stylus Testnet). Every move you make is a separate transaction.
The important piece of information in the game is where exactly the bugs are (the fields you shouldn't click). If the smart contract chooses these spots and stores them on chain, then it would be trivial to win the game by looking with a block explorer or other tools where the bugs are. To avoid this, the contract only stores which fields have been revealed so far. When the player makes a new move, the smart contract re-generates a potential assignment of bugs on the field that's consistent with the moves made so far. This makes that the game remains unpredictable.
This project uses Arbitrum Stylus for the smart contracts that manage the game. They are written in Rust and compiled to WebAssembly. This makes that the simulation of the state that's consistent with opened fields so far is performant and not too expensive in terms of gas.
The frontend is made in Typescript with Vue/Nuxt.