hackquest logo

GamefiMantle

GamefiMantle is a blockchain-powered multiplayer combat game that showcases advanced permission management through innovative smart contract architecture.

Videos

Description

🕹️ GamefiMantle

GamefiMantle is an innovative blockchain gaming platform built on Mantle Sepolia that revolutionizes Web3 payments. By combining advanced ERC-20 permission delegation with a gasless transaction architecture, it offers a seamless multiplayer RPG experience where players team up to fight enemies from the Upside Down.

This project demonstrates how sophisticated smart contract design can eliminate traditional blockchain friction—allowing users to focus on strategy and gameplay while the backend handles complex gas management and security.


🔐 Core Innovation: Advanced Permission System

The dApp features a unique three-tier permission architecture that enables trustless, gasless payments:

  • Player Approval Layer: Users grant a one-time WMANTLE token approval to the smart contract, removing the need to sign every individual move.

  • Delegation Layer: The GhostSessionDelegate contract manages spending permissions, allowing the system to securely execute actions within strict user-defined limits.

  • Execution Layer: The backend server signs and submits transactions, paying all gas fees while the weapon cost is deducted from the shared team pool.

💰 Democratic Payment Governance

In Multiplayer Mode, the game implements on-chain voting for treasury management. Before any crypto is spent on weapons:

  1. A player proposes a weapon.

  2. A 10-second voting window opens.

  3. The team must reach consensus (>50%) to authorize the transaction.

    This ensures fair resource allocation and prevents unauthorized spending, proving that Web3 payments can be both secure and democratically governed in real-time.


🎮 Gameplay Features

1. Character Selection

Choose from 10 iconic avatars before entering the rift:

  • The Party: Mike, Eleven, Dustin, Lucas, Will, Max

  • The Allies: Steve, Nancy, Jonathan, Hopper

2. Battle Modes

  • 👤 Solo Mode: Instant action with direct control. No voting required—click to launch.

  • 👥 Multiplayer Mode: Co-op PvE for 2-4 players. Features real-time WebSocket synchronization and team voting mechanics.

3. The Arena & Arsenal

Players face off against the Demogorgon, Mind Flayer, and Vecna across 5 rounds. Use WMANTLE to purchase weapons, with damage and effects rendered via real-time animations.

Weapon

Cost (WMANTLE)

Damage

Effect

🔥 Molotov

0.001

150

Fire Damage

🔥 Flamethrower

0.003

300

Burn

💥 Grenade

0.005

500

Explosive

🚀 Rocket

0.008

800

Heavy Impact

☢️ Nuke

0.015

1500

Ultimate


🏗️ Technical Architecture

  • Frontend: Built with Next.js 16.1.1 (TypeScript), featuring Tailwind CSS for styling and Framer Motion for immersive battle animations.

  • Web3 Integration: Uses RainbowKit, Wagmi, and Viem for seamless wallet connection and contract interaction.

  • Real-Time Sync: Custom Node.js + Express backend using WebSockets (ws) to synchronize game state, votes, and health bars across all clients instantly.

  • Blockchain: Deployed on Mantle Sepolia Testnet (Chain ID: 5003).

    • Native Token: MNT (Gas - paid by backend).

    • Game Currency: WMANTLE (Wrapped Mantle).


🛠️ Tech Stack

  • Solidity

  • ERC-20

  • Next.js

  • ethers.js

  • WebSocket

  • Mantle Network


🔗 Project Links

Progress During Hackathon

Over 72 hours, we built a complete blockchain gaming platform from scratch. Day 1-2 focused on smart contract development and backend infrastructure—deploying the GhostSessionDelegate contract to Mantle Sepolia and implementing WebSocket-based real-time synchronization. Day 3-4 brought the frontend to life with Next.js, creating the character selection, multiplayer lobby, and RPG-style battle arena with 2x2 grid layouts. Day 5-6 added the democratic voting system with 10-second voting windows, attack animations, and battle log features. Day 7 was deployment and testing—pushing the frontend to Vercel, backend to Render, and conducting extensive multiplayer testing. The result: a fully functional Web3 game with gasless transactions, real-time multiplayer, and on-chain governance—all production-ready .

Tech Stack

Next
Web3
Solidity
Viem
ethers.js

Fundraising Status

Currently self-funded and built specifically for the mantle Global Hackathon 2025 . We are looking to validate the MVP and exploring ecosystem grants

Team Leader
KKrish Sharma
Sector
SocialFiGamingDeFi