DealMaster
https://drive.google.com/drive/folders/1dM3ii0kX7V-X0WLmf1KbKt1LmFqpkQKX?usp=sharing
Problem Statement
Deal Master is a simple yet engaging on-chain money game that brings the excitement of Deal or No Deal into Web3. Players join the game by paying a fixed entry fee (e.g., $20 in PYUSD) into the smart contract. The contract then generates 8 hidden cards, each holding a potential prize value, with the top prize being 10× the entry fee. These values are assigned using Pyth randomness, ensuring no manipulation and full transparency.The player selects one card to keep, while the remaining cards are revealed round by round, building suspense as high or low values get eliminated. At key stages, the “banker” (implemented on-chain) offers the player a deal calculated as 70% of the average remaining card values. The player must decide: take the safe payout or risk it for a bigger prize. In the final round, when only two cards remain, the player chooses to stick or swap. The chosen card is revealed, and the prize is instantly paid out in PYUSD.This project showcases how stablecoins can power fun, transparent, and fair games while leveraging on-chain randomness to guarantee trust.
Solution
To build Deal Master, we combined smart contracts, randomness oracles, stablecoin payments, and an AI-driven experience into a seamless Web3 game. The backend logic is powered by a Solidity smart contract deployed on flow EVM , which handles entry fees in PYUSD (ERC-20), assigns random prize values using Pyth Entropy, manages the “burn + reveal” mechanics, calculates banker offers, and ensures instant payouts in stablecoin. This guarantees fairness, transparency, and trust.On the frontend, we used React + TailwindCSS for a lightweight, engaging UI and wagmi/ethers.js for wallet connectivity. The UI mirrors the suspense of the original Deal or No Deal—players interact with five sealed cards, see animated reveals, and receive dynamic banker offers.To make the experience more interactive, we integrated Alliance Super Intelligence, which powers an AI-based Banker Agent. Instead of static math-based offers, the banker can negotiate, use persuasive language, and adapt its tone depending on revealed values. This gives the game a more human-like tension while still ensuring payouts are computed transparently on-chain.One particularly hacky solution was simulating multi-step game state transitions entirely within one contract session, minimizing gas usage while preserving suspense. This blend of stablecoins, randomness, and AI negotiation makes Deal Master stand out.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- sanketnighot
16 contributions