Video thumbnail

LockBlock

Infinite play-to-earn 2d platformer with community made maps

LockBlock

Created At

ETHGlobal Prague

Project Description

Description LockBlock is a decentralized, skill-based 2D platformer game that runs on a blockchain infrastructure and uses a token-based economy. The world of LockBlock is divided into small land plots called chunks, each represented as an NFT. Players can own or rent chunks, build custom platformer levels with multiple exits, and set token-based entry fees. Only one of the exits leads to a reward — and the correct exit is randomly chosen using an on-chain verifiable random function (VRF), ensuring fairness.

Players wager tokens to enter levels, and those who find the correct exit win a reward that is N times the entry fee, where N is the number of exits. Level creators (chunk owners) earn a portion of the entry fee, incentivizing them to create fun, beatable levels. All transactions are handled by audited smart contracts, ensuring transparency and trustlessness in rewards and deposit flows.

LockBlock combines exploration, risk-reward decision making, and on-chain earnings into a unique GameFi experience.

How it's Made

How It's Made LockBlock uses a hybrid architecture combining a blockchain backend with real-time web technologies:

Frontend: Built with React and Ethers.js, the frontend handles wallet connections, signing interactions, and communicates with the backend via REST and WebSocket. It also includes a map editor for chunk owners to design levels and manage their exits.

Backend: The backend is written in Node.js and powered by Nitrolite from Yellow, which acts as a state channel and transaction relay hub for off-chain token interactions and player session tracking. It handles matchmaking, level availability, and result submission pipelines.

On-chain Randomness: We use Flow’s on-chain randomness smart contract to determine the winning exit in a verifiable and tamper-proof way. This ensures each level’s reward logic is fair and transparent.

Smart Contracts: All game-critical logic (entry deposit, rewards, chunk ownership, moderation flow) is implemented in Solidity and deployed on EVM-compatible networks. Contract interactions are wrapped via Ethers.js on the frontend and backend.

NFTs: Chunks are stored as ERC-721 tokens, with associated level metadata stored on IPFS. Owners can rent them out or design new maps to attract players.

Token Economy: Token deposits are split into reward pools, chunk owner royalties, protocol treasury, and moderation fees. This is fully managed on-chain to ensure transparency.

Security & Fairness: To guarantee trust, we use Flow randomness for prize exit selection and audited smart contracts to prevent fraud. Player interactions are logged both on-chain and off-chain with dispute resolution mechanics in place.

Hacky/Clever Part: We created a bridge between Nitrolite and our smart contracts to simulate instant deposit confirmations via channel state updates, which lets players play without waiting for on-chain confirmations.

background image mobile

Join the mailing list

Get the latest news and updates