Surge
Surge is a real time PvP gaming platform on Flow EVM, where two players stake crypto, play quick skill-based games, and the winner takes most of the pot instantly.
Videos
Tech Stack
Description
SURGE ⚡
A Web3 Skill-Based Gaming Arena on Mantle
SURGE is a decentralized 1v1 skill-based gaming platform where players stake MNT, compete head-to-head in cognitive games, and the winner takes the pot — all secured by smart contracts.
No luck. No bots. Just pure skill.
Players connect their wallets, deposit stakes, get matched with real opponents in real-time, and prove their cognitive abilities across 5 unique games. Every match is trustless, every payout is instant, and every victory is earned.
🚀 Features
On-chain Skill Gaming: Fair play with stake deposits, real-time matchmaking, and automatic payouts
5 Cognitive Games: Test memory, reflexes, pattern recognition, and word skills
Real-time P2P Matchmaking: WebSocket-powered opponent matching with synchronized game starts
Non-Custodial Stakes: Smart contracts hold funds; winners withdraw directly
Live Leaderboards: Track top players, earnings, and win rates on-chain
Cross-chain Ready: Built for Mantle with multi-chain architecture
🎮 The Games
Game | Difficulty | Skill Tested |
|---|---|---|
Number Memory Battle | Hard | Remember 8-digit sequences in 500ms flashes |
Word Scramble Duel | Hard | Unscramble API-generated words in 15 seconds |
Pattern Predictor | Hard | Predict the next shape in visual sequences |
Reflex War | Medium | React to random signals faster than your opponent |
Memory Match Showdown | Hard | Find 10 pairs among 20 cards in 45 seconds |
Every game uses synchronized challenges — both players see the same content at the same time.
🛠️ Tech Stack
Layer | Technology |
|---|---|
Frontend | Next.js 16, React, TypeScript, Tailwind CSS |
Animations | GSAP for premium micro-interactions |
Web3 | Wagmi v2, Viem, MetaMask SDK |
Blockchain | Mantle Sepolia Testnet (Mainnet ready) |
Backend | Node.js, Express, Socket.io |
Database | Firebase Firestore (match history, leaderboards) |
Smart Contracts | Solidity, Hardhat |
📜 Smart Contracts
SurgeGaming.sol
Core game contract handling:
Stake deposits with match creation
Winner declaration with payout calculations
Draw handling with stake refunds
Platform fee distribution (25%)
Deployed Contracts
Network | Contract | Address |
|---|---|---|
Arbitrum Sepolia | SurgeGaming |
|
Mantle Sepolia | SurgeGaming |
|
Platform Wallet
Minimum Stake
0.0001 MNT (655af3107a4000 wei)🎯 How It Works
1. Connect Wallet → MetaMask integration with Mantle
2. Choose Game → Select from 5 skill-based challenges
3. Set Stake → Pick 0.001 to 0.1 MNT
4. Deposit → Smart contract secures both players' stakes
5. Get Matched → Real-time WebSocket matchmaking
6. Play → Compete head-to-head with synchronized challenges
7. Win → Smart contract releases funds to winner
8. Withdraw → One-click payout to your wallet
🔗 Mantle Integration
Why Mantle?
⚡ Fast transactions for real-time gaming
💸 Ultra-low fees for micro-stakes
🔒 Ethereum-level security
🚀 Perfect for high-frequency game interactions
Native Token: MNT (used for all stakes and payouts)
🗄️ Backend Architecture
Real-time Matchmaking
Player joins queue → WebSocket broadcasts
Match found → Both players notified
3-second countdown → Game starts simultaneously
Scores submitted → Smart contract declares winner
Firebase Integration
Match history storage
Leaderboard aggregation
Player statistics tracking
🎮 Demo
Live App: https://surge-snowy.vercel.app/
⚡ Quickstart
Prerequisites
Node.js v18+
MetaMask wallet
Mantle Sepolia testnet configured
MNT test tokens
Install & Run
# Clone the repositorygit clone https://github.com/Mrinmoy-programmer07/Surge.git
cd Surge
# Install frontend dependencies
cd frontend
pnpm install
# Install backend dependencies
cd ../backend
pnpm install
# Start backend server
pnpm start
# Start frontend (new terminal)
cd frontend
pnpm run dev
Deploy Contracts
cd contractspnpm install
npx hardhat compile
npx hardhat run scripts/deploy.js --network mantleSepolia
🔗 Links
SURGE. Play. Win. Earn. ⚡