InverseArena
The RWA Powered multiplayer blockchain elimination game where minority wins. Built on Mantle network
ビデオ
テックスタック
説明
INVERSE ARENA
The RWA-Powered multiplayer blockchain elimination game where minority wins. Built on Mantle network.
Live Link : https://inverse-arena-frontend.vercel.app/
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
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.
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.
Mantle Modular Speed: Leveraging Mantle’s low fees and high throughput to ensure instant matchmaking and seamless, low-cost "Head or Tails" rounds.
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