hackquest logo

InverseArena

The RWA Powered multiplayer blockchain elimination game where minority wins. Built on Mantle network

ビデオ

テックスタック

Next
Node
Ethers
Solidity
React
mantle
Web3

説明

INVERSE ARENA

The RWA-Powered multiplayer blockchain elimination game where minority wins. Built on Mantle network.

Live Link : https://inverse-arena-frontend.vercel.app/

Pitch Deck: https://www.canva.com/design/DAG-ZjrkX2M/KDpjTgTLUYak71EzxhxM6w/edit?utm_content=DAG-ZjrkX2M&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton

Description:

Inverse Arena is a blockchain elimination style prediction game where players compete in pools by making binary choices (Heads or Tails). The twist: players who choose the minority option advance to the next round, while the majority gets eliminated. The last player standing wins the entire prize pool. BOTH player stakes AND creator stakes generate REAL institutional yield from Mantle's RWA protocols (USDT0, mETH) during gameplay. Players STAKE entry fees that auto deposit into yield protocols (4-6% APY), while creators stake 30+ USDT0 to become game hosts (earning 5% APY on stake PLUS 10% fees from every successfully resolved game).

PROBLEM STATEMENT

1. The GameFi Sustainability Crisis

Most Web3 games rely on inflationary token emissions to reward players. When new player growth slows, the token value crashes, the economy collapses, and the project fails. Investors are tired of "Ponzinomics" that lack a real revenue floor.

2. The Idle Capital Inefficiency

Currently, billions in GameFi TVL (Total Value Locked) sits stagnant in smart contracts. While players and stakers wait for matches or progress through levels, their capital earns $0$ interest. This is a massive opportunity cost for users and a waste of liquidity for the ecosystem.

3. The "Majority-Rule" Boredom

Traditional prediction games often reward the majority, leading to "herd behavior" and low-stakes excitement. There is a lack of high-tension, contrarian gameplay that rewards strategic intuition and psychological play, leading to stagnant retention rates.

4. Fragmented UX & Value Friction

Players face a "dead-air" problem: long matchmaking wait times with no value accrual. If a player waits 10 minutes for a game to start, they have lost both time and potential yield. Current platforms fail to bridge the gap between DeFi earning and Active gaming.

OUR SOLUTION

  1. RWA-Powered Prize Pools: Player stakes ($USDTO$) are never idle. They are immediately routed into institutional-grade, yield-bearing Real-World Assets. The prize pool grows every second the game is active.

  2. The "Contrarian" Game Engine: A high-tension PvP survival game where you only survive if you choose the minority side. It’s a psychological battle that rewards strategy over herd behavior.

  3. Mantle Modular Speed: Leveraging Mantle’s low fees and high throughput to ensure instant matchmaking and seamless, low-cost "Head or Tails" rounds.

  4. Sustainable Rewards: Unlike other games, our rewards aren't "printed" they are harvested from real-world yield, creating a non-inflationary, long-term economic model.

USER FLOW

COMPLETE GAME EXPERIENCE:

CREATOR STAKING & GAME CREATION FLOW:

STEP 1: BECOMING A CREATOR (One-Time Setup)

• User stakes minimum 30 USDT0 via stakeAsCreator(amount)

• Stake automatically deposited to YieldVault (5% APY begins immediately)

• Stake generates passive yield: 30 USDT0 × 5% = 1.5 USDT0/year

• Creator status unlocked: can now create unlimited games

• Creator stake tracked in creatorStakes[address].stakedAmount

• Active games count tracked (prevents unstaking during active games)

STEP 2: CREATING A GAME

• Creator Requirements:

- Must have active stake (30+ USDT0)

- Stake must be in YieldVault generating yield

• Game Configuration:

- Entry Fee: 1-100,000 USDT0 (configurable)

- Max Players: 4-20 players

- Currency: USDT0 (primary), mETH, or native MNT

- Game Mode: QuickPlay (instant) or Scheduled (future time)

- Creator pays entry fee (same as players) to create game

• Smart Contract Actions:

- Transfer entry fee from creator to GameManager

- Auto-deposit creator's entry fee to YieldVault (USDT0 protocol)

- Yield accumulation begins immediately for entire pool

- Game creator address stored in game.creator

- Creator's activeGamesCount incremented

- Game status: WAITING (needs players)

STEP 3: GAME RESOLUTION & CREATOR REWARD

• When game completes successfully:

- Calculate total prize pool + accumulated yield

- Distribute 10% creator fee to game creator

- Distribute 5% platform fee to treasury

- Winner receives: 85% of pool + 100% of yield

- Creator's activeGamesCount decremented

• Creator Reward Example:

Game Pool: 1,000 USDT0

Yield Generated: 2.1 USDT0 (during 15-min game)

Total: 1,002.1 USDT0

Creator Fee: 100.21 USDT0 (10%)

Platform Fee: 50.11 USDT0 (5%)

Winner Receives: 851.89 USDT0 (85% pool) + 2.1 USDT0 (100% yield) = 853.99 USDT0

• Creator earns passive yield on stake PLUS fees from games

• This dual-yield mechanism incentivizes quality game curation

PLAYER PARTICIPATION FLOW:

1. Discovery

• Browse active games on frontend

• Filter by entry fee, currency, status

• See real-time player count and yield accumulated

2. Join Game

• Click "Join Now" button

• Approve token spend (if ERC20) - one-time approval

• Transfer entry fee to GameManager

• Auto-deposit to YieldVault

• Player added to game.playerList[]

3. Game Start Trigger

• Minimum players reached (4 players)

• 1-minute countdown begins

• More players can join during countdown

• Game starts automatically when countdown expires OR max players reached

GAMEPLAY ROUND FLOW:

Round N:

1. Round Starts

• Status: IN_PROGRESS

• Round duration: 30 seconds

• Deadline: block.timestamp + 30 seconds

• All players choose HEAD or TAIL

2. Choice Submission

• Player calls: makeChoice(gameId, Choice.Head/Tail)

• Contract records choice in rounds[gameId][round].choices[player]

• Choice count updated: round.choiceCounts[choice]++

• Player marked: playerInfo[gameId][player].hasMadeChoice = true

3. Round Processing (Automatic or Manual)

Option A: All players chose (automatic)

• Check if all active players made choice

• Trigger _processRound() automatically

• Continue to outcome

Option B: Timeout (30 seconds)

• Anyone can call: processRoundTimeout(gameId)

• Auto-eliminate players who didn't choose

• Process remaining choices

• Continue to outcome

4. Outcome Determination

• Chainlink VRF request for random outcome (HEAD or TAIL)

• VRF callback updates: round.winningChoice

• Count players who chose winning choice → MINORITY

• Eliminate players who chose majority choice

• Update: playerInfo[eliminated].eliminated = true

5. Check Game Completion

• If remaining players == 1:

→ Declare winner → GAME_COMPLETED

• Else:

→ Increment round → Back to step 1

6. Winner Distribution

• Calculate total yield accumulated

• Distribute yield proportionally (100% to winner)

• Calculate fees: platform (5%), creator (10%)

• Transfer principal + yield to winner

• Mint "Tournament Champion" NFT

• Update leaderboards

REAL-TIME YIELD ACCUMULATION:

Throughout the entire game flow, the YieldVault continuously calculates yield:

Yield = Principal × APY × (block.timestamp - deposit.timestamp) / 1 Year

This yield is visible to players in real-time via frontend UI.

ARCHITECTURE

SMART CONTRACT STACK:

INVERSE ARENA PROTOCOL

┌────┼────┐

GameManager Matchmaking YieldVault

└────┼────┘

USDT0 Protocol mETH Protocol Aave V3

|

NFTAchievements

CORE CONTRACTS:

1. GAMEMANAGER.SOL (Main Game Logic)

- GameManager: 0x495989595bb1a6c3a6acd2b36a91a0739154fb6b

  - Transaction: 0xcbaab661410e4939489f1c49c55b6d166ab86c3946b36fc30010862c616f06e6  - [Explorer](https://explorer.sepolia.mantle.xyz/address/0x495989595bb1a6c3a6acd2b36a91a0739154fb6b)

Key Features:

• Multi-currency support (USDT0, mETH, native MNT)

• Provably fair randomness via Chainlink VRF

• Real-time yield tracking

• Multiple game modes (QuickPlay, Scheduled, Private)

• Creator staking system (30 USDT0 minimum)

• Automatic round processing with 30-second timeouts

• Yield distribution on game completion

Key Functions:

- createQuickPlayGameUSDT0(uint256 entryFee, uint256 maxPlayers)

- createQuickPlayGameMETH(uint256 entryFee, uint256 maxPlayers)

- joinGame(uint256 gameId)

- makeChoice(uint256 gameId, Choice choice)

- stakeAsCreator(uint256 amount) // 5% APY on stake

- unstakeCreator()

- claimCreatorYield()

2. YIELDVAULT.SOL (RWA Yield Engine)

- YieldVault: 0xB47E02e88d10751Ca6FA79EbcD85fAd4a619a815

  - Transaction: 0x90ba3f9385c3a11b7150a2fa02e66843cb14ff712f5c77263c777805bb143d7f  - [Explorer](https://explorer.sepolia.mantle.xyz/address/0xB47E02e88d10751Ca6FA79EbcD85fAd4a619a815)

Purpose: Manages deposits to Mantle's RWA protocols and calculates yield

Supported Protocols:

• USDT0 Protocol (5% APY) - PRIMARY

• mETH Protocol (4% APY)

• Aave V3 (6% APY) - Ready for integration

• Ondo USDY (4.5% APY) - Optional

Key Functions:

- depositUSDT0(uint256 gameId, uint256 amount)

- depositMETH(uint256 gameId, uint256 amount)

- depositToAave(uint256 gameId, address asset, uint256 amount)

- getAccumulatedYield(uint256 gameId) returns (uint256)

- getYieldBreakdown(uint256 gameId) returns (principal, yield, APY, time, protocol)

- withdrawToContract(uint256 gameId) returns (principal, yield)

Yield Calculation Formula:

Yield = Principal × APY × (Time Elapsed / 1 Year)

Example: 1,000 USDT0 × 5% × (15 minutes / 525,600 minutes) = ~2.1 USDT0

3. MATCHMAKING.SOL

- Matchmaking: 0xea395fb4831028a3ad91a106281f5f8284cbabda  - Transaction: 0x4ee69ffece8f97635ccbe6a006cc43eb2e040f30457d4f2fa61996719c2d2e5a  - [Explorer](https://explorer.sepolia.mantle.xyz/address/0xea395fb4831028a3ad91a106281f5f8284cbabda)

Purpose: Solves the "waiting room problem"

Features:

• Smart queue system matching players by entry fee

• Automatic game creation when threshold reached

• Multiple queue buckets (low, medium, high stakes)

• <30 second average matchmaking time

4. NFTACHIEVEMENTS.SOL (User Retention & Gamification)

Purpose: Mint NFT badges for player milestones

- NFTAchievements: 0x3ff2eba8f98587a20a49805bfc2bf5d220a77611

  - Transaction: 0x2dbbe7e38546d244fb0f2ab0c7da7b304875328ad51c2098121be87b0b9d9799  - [Explorer](https://explorer.sepolia.mantle.xyz/address/0x3ff2eba8f98587a20a49805bfc2bf5d220a77611)

Achievement Types:

• First Victory

• Winning Streak (3, 5, 10 games)

• Tournament Champion

• Loyalty Tiers (Bronze → Platinum)

• High Stakes Winner

• Yield Accumulator (earned X yield)

User Retention Impact:

• NFT badges create collectible value

• Leaderboards drive competition

• Achievement hunting increases session time

• Social sharing of rare NFTs

ハッカソンの進行状況

Our journey during the Mantle Global Hackathon began with a deep dive into the architecture of capital efficient gaming. In the first phase, we focused on building a modular foundation that could bridge the gap between DeFi yield and competitive PvP mechanics. We successfully architected a protocol where player stakes are never idle; instead, they are routed through our custom YieldVault into Mantle-native RWA protocols. This required setting up a robust development environment using Foundry and Hardhat, allowing us to support multiple assets including $USDTO$ and $mETH$ from day one.As we moved into smart contract development, we implemented the GameManager contract to handle the entire lifecycle of an elimination game, from pool creation to the final payout. We prioritized security and transparency, building a creator staking mechanism that requires a minimum deposit of 30 $USDTO$ to ensure skin in the game. To validate our logic, we ran over 100 test cases covering every possible edge case in the elimination rounds. This backend was then integrated with a responsive Next.js frontend, where we focused on real-time state synchronization so players can see round transitions and yield accumulation as they happen on the Mantle Sepolia testnet. Overcoming Technical Hurdles: One of the most significant challenges we faced was the discovery that Chainlink VRF is not currently available on the Mantle Network. For a game built on binary choices and eliminations, provably fair randomness is not just a feature it is a requirement for trust. Rather than slowing down, we used this as an opportunity to innovate. We engineered a hybrid entropy engine that generates randomness on-chain by combining block-hash data, player addresses, and unique game-state timestamps. By hashing these multiple sources of entropy together, we created a system where no single player or miner can predict or manipulate the outcome, ensuring the "Minority Wins" logic remains bulletproof.
チームリーダー
JJames Victor
プロジェクトリンク
業界
NFTGamingDeFi