Group-chat crypto betting using XMTP with real-time Pyth price feeds & entropy.
Chat Price Bet is a group-chat betting miniapp built for ETHGlobal Buenos Aires 2025. It lets users place quick, friendly bets on whether the ETH price will go up or down within a 5-minute window—all directly inside an XMTP-powered group conversation. By combining the XMTP React SDK for messaging, Pyth’s pull-based price feeds for real-time market data, and Pyth Entropy for on-chain randomness, the app delivers a seamless, transparent, and fair betting experience. Users can chat, place bets, track real-time updates, and get instant results—all from a clean, modern interface. Built on Sepolia with fully on-chain bet resolution, the project demonstrates how messaging, oracles, and blockchain logic can come together to create a fun, social, and trustless prediction game.
Chat Price Bet is built using a modern full-stack Web3 stack: a Next.js 14 frontend with React, TypeScript, and Tailwind CSS, paired with Wagmi, RainbowKit, and ethers.js for wallet connectivity. XMTP’s React SDK handles all messaging, enabling group conversations, real-time message streaming, and a smooth miniapp-style experience inside the chat. On the blockchain side, we deployed Solidity smart contracts to Base Sepolia using Hardhat. These contracts use Pyth’s pull model to fetch ETH/USD prices via Hermes and validate them on-chain with updatePriceFeeds and getPriceNoOlderThan. To guarantee fairness, bet resolution integrates Pyth Entropy to generate verifiable randomness for outcomes. The combination of live chat UX, reliable oracle data, and trust-minimized randomness creates a fully on-chain, social betting game. Everything ties together through a clean architecture that keeps messaging, UI state, and smart contract interactions neatly separated.

