live app: https://stage.mortalcoin.app
MortalCoin HyperHack Hackathon Submission
Live link: https://stage.mortalcoin.app/
Game demo video: https://youtu.be/4ZrYxP0vC_w
Alith AI trading bot demo video: https://youtu.be/GtFaSFPcWYc
AI trading bot Repo: GitHub - MortalCoin/mortalcoin_alith_bot: MortalCoin’s AI playing bot makes decisions using the Alith AI Agent.
Contract repo: GitHub - MortalCoin/mortalcoin-evm
Contract on Hyperion: Metis Hyperion Testnet address details for 0xDf8730693833b9e27D5999863feBb3028fcc6927 | Blockscout
MortalCoin is a real-time PvP crypto trading game where players battle using simulated trades based on live market data. Think Mortal Kombat meets Hyperliquid, with cryptocurrencies personified as playable fighters.
Each battle simulates a short (60-second, currently) trading session where players choose strategies and try to outtrade their opponents. Both players lock in equal bets before the game starts — the winner takes it all.
The core monetization model is a small operational fee (currently 1%) deducted from the total pot upon payout, handled directly by the game smart contract.
Gameplay explained: Trading Fight – Gamified Crypto Battles Inspired by Hyperliquid and MortalKombat | MortalCoin Docs
What We Built
It’s been an exciting month of non-stop building on the Hyperion Testnet.
Our small but mighty team smashed keyboards and shipped features.
The team members are:
-
@artemii235 Artem, blockchain developer (mainly in Rust) — designed and developed the smart contract, overall technical concept, CLI, and MM tools.
-
@g.ionov George, backend developer (Python) — developed the backend authentication module, relay exchange system, and matchmaking.
-
@tonymorony Tony (me) - developed the frontend (TypeScript, Vite) and the Alith AI playing bot (Python), acted as PM, QA, and UX/UI designer, and was responsible for planning, documentation, and external communications.
Here’s what we accomplished:
1. Brainstormed and Designed the Game Concept
We came up with the idea for an on-chain trading competition game:
2. Designed and Deployed the Game Smart Contract
Repo: GitHub - MortalCoin/mortalcoin-evm
Deployed on Hyperion Testnet:
3. Built an AI-Powered Playing/Trading Bot
We leveraged the power of Alith AI to make in-game trading decisions in real time.
Repo: GitHub - MortalCoin/mortalcoin_alith_bot: MortalCoin’s AI playing bot makes decisions using the Alith AI Agent.
Demo: https://youtu.be/GtFaSFPcWYc
4. Frontend Development
A lot of work went into the frontend, including:
- Privy authentication integration
- Complete game flow design
- Game history & player profiles
- Contract and backend integration
All tied together to deliver a real-time on-chain PvP experience.
5. Backend Infrastructure
We created a backend layer to:
- Relay and sign off-chain position commitments for PvP
- Watch ongoing games
- Hide player directions using signature logic
6. Developer Utilities
a) Market Maker Bot for Hyperion Test DEX
Repo: GitHub - MortalCoin/mortalcoin-dex-bot
Used to simulate trading activity and provide price feeds for our battles.
b) CLI for Smart Contract Interactions
Repo: GitHub - MortalCoin/mortalcoin-evm-cli
Simplifies game creation, testing, and technical validation.
Live Presentation:
We also showcased MortalCoin during a Metis Vibe Session
Key Challenges
1. Matchmaking and the PvP Challenge
Since the game is PvP, the main challenge is matchmaking. If a player creates a game and no one joins — that’s a blocker, especially during the early stages of the project when user activity is low.
To solve this, we developed a matchmaking bot that plays by trading using AI. It acts as a kind of agent filling the role of an opponent.
Repo:
The bot constantly monitors the matchmaking lobby, joins open games, listens to the ongoing game state (real-time prices, opponent actions, etc.), and tries to make good decisions based on its assigned role.
2. Price Feeds and Market Simulation
Another major challenge is the price feed. To make the game fun, prices must move often enough and reflect meaningful market behavior — while remaining accurate.
Technically, it’s possible to integrate real asset trading instead of paper trading, but:
- It complicates the game and pushes it toward being more of a gamified trading wrapper (not necessarily bad — could be explored separately)
- It requires a liquid perpetual market to support both long and short positions
- Prices must be reliable and update on very short timeframes (e.g., per second or even tick-level)
We haven’t found a suitable decentralized solution suitable for POC (like an oracle refreshing fast enough), so for testnet we built our own market-making bot that simulates price movement on AMM DEX pairs - effectively acting as an in-house oracle.
Repo:
3. Gameplay Depth via Hidden Information
I wanted to make the game interesting, adding elements of partially hidden information, similar to poker. If all variables are visible — current price, realized PnL, positions (yours and your opponent’s) — it turns into a deterministic equation-solving task rather than a game.
So, in MortalCoin, you only know whether the opponent has opened a position — but not the direction (long or short). This creates tension and strategy.
To support this, we implemented a system where positions are hashed with a backend key before being sent on-chain. The flow is:
- Player sends an EIP-712 object with position details to the backend
- Backend hashes the position and signs it
- Player submits the hashed version to the smart contract
- Direction is only revealed when the player closes the position
This prevents sniping and adds a layer of strategy.
4. Incomplete Games and Forced Finalization
One more big challenge: non-finished games, whether abandoned on purpose or due to connection loss.
The contract calculates PnL based on the price at the time of position closing, which opens a potential exploit where a malicious player might avoid closing their position to lock in a win or deny the opponent’s reward.
To prevent this, we added a forceFinish function to the contract. Our backend watcher monitors all ongoing games and triggers forceFinish for any game that wasn’t completed in time.
It was also tricky to implement a reliable system for storing nonces and direction data on the backend side, so we could finalize games even when one player is unresponsive.
Game Flow: Sequence Diagram
What’s Next?
We’re just getting started!
-
Alpha Testing (ETA: August)
Polish all layers, pay off technical debt, and prepare for community testing (small events with $ rewards). -
Beta Testing (ETA: September – October)
Launch the first tournament with real, bigger prizes and continue collecting feedback.
-
Mainnet Launch (ETA: December – January)
Huge tournament event (with seasons, ELO rankings, and leagues), plus Gleam, Galxe & Layer3 campaigns, and paid ads to amplify everything!




