Loops HouseMempire

NEAR HACKATHON
Links
Team
1 member- MAOwner
Manikanta
Overview
When real money rides on a fast online game, someone has to decide who won. Usually that is the game's server, or the two players' apps agreeing, and a cheating app can report a false win. Mempire is a real-time card battler (two lanes, towers, refilling energy) where players stake testnet NEAR and a NEAR contract decides the winner by replaying the match itself. Every card a player drops is stored on chain. At the end, the referee contract (mempire-arena-41966.testnet) re-runs the whole game in WebAssembly, saving checkpoints if it runs out of gas, then pays 92% to the winner, 3% to a weekly season pool and 5% to a treasury. A claim with the wrong winner is rejected on chain. The match receipt page replays the same log in the browser and shows Verified when winner, final tick and state hash match the contract. NEAR features used: per-match function-call keys limited to the arena's play method with a 0.25 NEAR gas allowance, so card drops need no wallet popup and the key cannot move funds (deleted after the match); NEP-366 meta transactions so guests get sponsored setup; sub-accounts for three house bots that fund their own treasuries; env::random_seed for the match seed; env::ed25519_verify for signed price snapshots; and OutLayer's TEE price oracle (price-oracle.testnet) for the market fighters' buffs. Players can sign setup, stake, settle and key deletion with their own Meteor Wallet testnet account. Limits: testnet only, not audited, no hosted demo (the app and relayer run locally), human Meteor approvals were not automated, email sign-in needs a provider key, NEP-141 stakes, card tokens and Intents are not built. The game design and art from earlier Mempire builds on other chains are disclosed baseline; the NEAR referee, keys, relayer and contracts are new.