CryptoMaze

A castle arena game where players stake to fight, on Flow with ENS names and Pyth randomness.

CryptoMaze

Created At

ETHGlobal New Delhi

Project Description

The central idea of our game is to combine the thrill of competitive gaming with the trustless transparency of blockchain.

Game Logic and Flow:

Each player begins by staking an amount greater than 1 USD to enter the arena – a castle-like battleground.

To strengthen the Web3 identity layer, we use ENS (Ethereum Name Service) to link each wallet address to a player’s in-game name.

Once inside the arena, players compete against each other for three minutes. The goal is simple: maximize kills.

When a player dies, they respawn at one of four random locations. These locations are determined using Pyth entropy, ensuring that even randomness in the game is decentralized and verifiable.

Leaderboard and Blockchain Integration:

A live leaderboard is maintained both within Unity and on-chain.

Every kill is recorded on the blockchain, keeping the game state transparent.

At the end of the match, the Unity leaderboard is submitted as input to the smart contract.

The contract cross-verifies Unity’s leaderboard with the blockchain’s own record.

If both match, rewards are distributed to the winner.

If there is any mismatch, the system automatically refunds stakes to all participants.

This mechanism ensures fairness, transparency, and verifiability, which are core principles of blockchain gaming.

Rewards and Post-Game Economy:

At the end of a round, the winner receives the staked prize pool.

Every participant is also rewarded with a treasure chest. They can either open it immediately or claim it later.

The number of in-game coins inside each chest is determined using Pyth entropy-based randomness.

These coins can be spent in our in-game marketplace to purchase NFTs such as skins, weapons, and other assets.

Additionally, each player earns a spin on the reward wheel.

The wheel contains six possible rewards – coins, NFTs, skins, or weapons.

The stopping point of the wheel is also chosen through Pyth-powered randomness, reinforcing decentralization at every step.

Technical Aspect: Our game is build in Unity and is deployed on the Flow testnet, chosen for its strong compatibility with gaming use cases, scalability, and user-friendly integration with NFTs.

How it's Made

We built this project using the Unity Engine, where we designed a 3D multiplayer game in which four players join a room and compete in a castle arena.

For blockchain integration, we used the ThirdWeb SDK for Unity, enabling seamless wallet connections and blockchain interactions directly inside the game. The core logic and verification are implemented through Solidity smart contracts, while WebSockets ensure smooth communication between Unity and the blockchain.

We integrated ENS to replace wallet addresses with human-readable names, improving the user experience. Pyth Entropy plays a central role in generating randomness for respawn locations, treasure chests, and spin-wheel outcomes—ensuring fairness that is provable on-chain. The game is deployed on the Flow testnet, which we selected for its scalability, consumer-grade design, and NFT-friendly ecosystem.

A key innovation is how the game maintains its state in both Web2 (Unity) and Web3 (blockchain). At the end of each match, the on-chain leaderboard is cross-verified with Unity’s leaderboard. If both match, rewards are distributed fairly; if not, all stakes are refunded. This hybrid model provides security, transparency, and error detection while keeping the gameplay fast and smooth.

This combination of technologies allowed us to create a fun, tempting, and verifiably fair gaming experience that leverages blockchain where it matters most: transparency, identity, and randomness.

background image mobile

Join the mailing list

Get the latest news and updates