Bet2Gether
Trust-Minimized Crypto Prediction Game with Automated Payouts & NFT Rewards









Overview
Bet2Gether is a decentralized prediction game where players bet ETH on crypto price movements (ETH, BTC, LINK, DAI). Built with Next.js, Solidity, Chainlink, and Tenderly, it ensures transparent outcomes, automated payouts, and provably fair NFT rewards. The project explores trust-minimized mechanics, real-time on-chain event-driven UIs, and hybrid on-chain/off-chain automation. Players can create or join games, place bets, claim rewards, and earn ERC-1155 NFT rewards.
Key features
- Trust-Minimized Prediction Games: Players bet on crypto price movements, with all pricing secured by Chainlink Price Feeds.
- Automated Game Resolution: Chainlink Automation (Keepers) resolves games at their deadline without admin intervention.
- Provably Fair NFT Rewards: Winning game creators receive randomized ERC-1155 NFTs using Chainlink VRF for verifiable randomness.
- Real-Time Updates: UI reacts instantly to new games, bets, and resolutions via Alchemy WebSockets and contract event listeners (Wagmi).
- Hybrid On-Chain/Off-Chain Automation: Tenderly Web3 Actions mint NFT rewards based on on-chain events, exploring off-chain automation.
- Smart Contract Testing: Solidity contracts tested with Foundry.
- Verified Smart Contracts: Deployed to Sepolia and automatically verified on Etherscan for transparency.
Technologies Used
- Solidity + Foundry: Core game logic, payout calculations, VRF integration, and comprehensive contract testing.
- Next.js + Wagmi: Frontend framework with wallet integration and event-driven data flow.
- Chainlink Services: Price Feeds for trustless pricing, Automation for game resolution, and VRF for NFT randomness.
- Alchemy WebSockets: Live updates for new games, bets, resolutions and NFT rewards.
Challenges and Learnings
Key challenges included coordinating multiple Chainlink services (Price Feeds, Automation, VRF) for trust-minimized game flow. Real-time updates required selective query refetching and event-driven UI state management. Implementing payout logic, NFT minting, and hybrid automation demanded careful isolation of contract logic.
Outcome
Bet2Gether is a fully functional crypto-assets price prediction platform deployed on Sepolia, featuring decentralized game mechanics, automated game resolution and payouts, provably fair NFT rewards, and real-time UI updates. The project deepened my expertise in Solidity, Chainlink, and full-stack Web3 development.












