project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

UnderDog

Underdog is a decentralized, permissionless sports prediction marketplace on the Chiliz Blockchain, featuring AI-driven verification, automated rewards, AMM-based order books, oracle-validated outcomes, and low-cost transactions for sports enthusiasts.

UnderDog

Created At

ETHGlobal Bangkok

Project Description

  • Underdog: Empowering Community-Driven Sports Prediction Markets

Underdog is a decentralized, community-first sports prediction marketplace built on the Chiliz blockchain, tailored for fans, enthusiasts, and traders alike. At its core, Underdog transforms the traditional prediction market by removing administrative barriers and empowering users to take full control. Unlike traditional platforms where admins define questions and markets, Underdog allows anyone to create, manage, and participate in prediction markets, fueled by the vibrant Chiliz ecosystem and its native token, CHZ.

Working:

  1. User-Created Markets The heart of Underdog lies in its open market creation system. Any user with a wallet and $CHZ liquidity can:
  • Pose their own yes/no questions on live or upcoming sports events.
  • Define the duration of the market (e.g., will it last 1 hour or 24 hours?).
  • Specify an initial liquidity pool in $CHZ to bootstrap the market. This decentralized model ensures that anyone—not just platform administrators—can shape the prediction landscape.

Examples:

  • "Will Manchester United score in the first half against Chelsea?"
  • "Will Novak Djokovic win the second set in the upcoming match?"

Liquidity Pools:

  • Markets operate using liquidity pools, where creators lock in CHZ to fund the "Yes" and "No" positions equally. This initial liquidity ensures that participants can trade positions with guaranteed payouts, even in markets with limited participants initially. The use of liquidity pools also creates trust, as payouts are always backed by locked funds, eliminating the need for middlemen.

  • Dynamic Orderbook Model The platform integrates a dynamic orderbook model, allowing participants to trade "Yes" and "No" positions based on real-time odds. As more participants bet, the odds adjust dynamically:

  • Higher liquidity on "Yes" reduces its payout ratio, and vice versa for "No." This model balances risk and reward in real time, offering participants an exciting, market-driven betting experience.

  • Market Resolution by Creators At the end of the market’s duration, only the creator of the market can resolve it by determining the outcome—True (Yes) or False (No). To ensure fairness and transparency, the platform incorporates a verification layer. The market creator must input the outcome with supporting evidence, which is verified using a combination of on-chain transparency and real-time AI-powered feeds. Underdog uses AI agents to provide real-time data feeds, such as live sports scores and event statistics, ensuring accuracy in market resolutions.

  • Claiming Payouts Once the market is resolved, participants can claim their payouts directly from the smart contract. The winnings are distributed proportionally based on the final odds and liquidity locked in the pool. All transactions are settled in $CHZ, ensuring a seamless and decentralized experience.

  • AI-Driven Real-Time Feeds Underdog leverages advanced AI agents to provide users with real-time sports feeds, helping them make informed predictions. These feeds include: Live updates on ongoing matches, player statistics, and team performance. Predictions about future games and trends based on historical data and AI analysis.

How it's Made

Underdog is the culmination of several cutting-edge technologies seamlessly integrated to create a decentralized, community-first prediction marketplace for sports. Our system is designed to handle the complexities of a dynamic and transparent prediction market while offering a frictionless user experience. Below is an in-depth breakdown of the technical architecture, system components, and the innovations that make Underdog unique.

  • System Architecture The architecture of Underdog is designed around a modular, decentralized system to ensure scalability, security, and extensibility. It consists of three core layers:
  1. Blockchain Layer (Chiliz Blockchain)
  • Smart Contract: All the market logic is encapsulated within a suite of Solidity smart contracts, deployed on the Chiliz blockchain, specifically chosen for its low transaction fees and sports-focused ecosystem. - Market Management Contracts: Handle decentralized market creation, liquidity pools, position-taking, and payout calculations. - Resolution Contracts: Govern market resolution, ensuring that outcomes are input by the creator and validated by on-chain rules.

  • Decentralized Liquidity Pools: Each market’s liquidity is split into "Yes" and "No" pools, funded by the creator. These pools power the dynamic odds mechanism. Liquidity providers are rewarded through transaction fees generated during market participation.

  • Event-Based Architecture: The smart contracts emit events (e.g., MarketCreated, PositionTaken, MarketResolved), which are subscribed to in real time using Ethers.js to ensure the front-end stays synchronized with blockchain data.

  1. AI-Powered Middleware Layer The AI middleware bridges the blockchain and external data sources, enabling real-time data integration, prediction generation, and resolution validation.
  • AI Data Pipeline: - Real-Time Sports Feeds: Integrated sports APIs (e.g., Sportradar, OpenSportsAPI) provide live match data, scores, and schedules. These feeds are ingested by a custom Node.js backend, which caches the data for real-time delivery to the platform. - Predictive AI Models: A custom LLM (Large Language Model), fine-tuned with sports data, powers the AI-driven market suggestions and question generation. For instance, the model can generate questions like, "Will Team A score in the first half?" based on live match contexts.

  • Resolution Validation: To maintain integrity during market resolution, the AI cross-references the creator’s input with live sports data. For example:

     - If a creator resolves a market with "Yes," the system verifies it against external match data (e.g., "Did Team X actually score?").
     - This validation layer is implemented using custom machine learning models, ensuring a decentralized but trustworthy resolution process.
                             
    
  1. Front-End Layer
  • Technology Stack: React.js powers the dynamic and interactive front-end, ensuring seamless user interactions for market creation, betting, and payouts.

  • TailwindCSS provides a modern, responsive design, with a color palette inspired by the sports and gaming industry. Framer Motion enhances the UI with smooth animations, creating a visually engaging experience for users.

  • Real-Time Updates: Using Web3.js and Ethers.js, the front-end listens for blockchain events to reflect real-time changes in odds, liquidity, and market status. This ensures that users always have the most accurate information.

  • Dynamic Odds Calculation: Odds are dynamically updated based on the liquidity distribution in "Yes" and "No" pools. A custom algorithm calculates the odds and payout ratios, ensuring transparency and fairness.

  • Key Features & Challenges

  1. Decentralized Market Creation

How It Works:

  • Any user can create a market by defining the question, duration, and initial liquidity (funded in CHZ tokens).
  • The smart contract ensures equal allocation of liquidity to "Yes" and "No" pools, eliminating bias. Challenges Solved:
  •         Building a fully decentralized market creation mechanism required careful design of smart contracts to balance trust and automation.
    
  1. AI-Driven Features
  • Market Suggestions: - Using a fine-tuned GPT-3.5 model, Underdog suggests market questions based on live events. This feature was built by training the model with structured sports datasets and using contextual prompts to make it relevant for real-time sports scenarios. - Example prompt: "Generate three yes/no questions about today’s NBA matches."

  • Resolution Validation: AI plays a critical role in verifying the outcomes of markets during resolution. By integrating external data feeds and custom-trained models, the platform cross-checks outcomes in near real-time, reducing the risk of manipulation or false resolutions.

  • Hacky Innovations: A hybrid approach was used for resolution validation, combining external API data and machine learning models to simulate a decentralized oracle system without introducing third-party dependencies like Chainlink.

  • Dynamic Orderbook Model The platform’s custom-built orderbook dynamically adjusts odds based on liquidity.

-Mathematics of Odds Calculation: Odds for "Yes" and "No" are inversely proportional to the liquidity in their respective pools. Example: If "Yes" has 70% of the liquidity, its odds decrease, offering a smaller payout, while "No" odds increase. Implementation Details:

Odds are recalculated on every liquidity change, using a lightweight formula implemented both on-chain (for payout enforcement) and off-chain (for front-end display). The system emits events whenever odds shift, triggering real-time updates on the UI. Hacky but Effective Features Custom Resolution Workflow: Instead of relying on third-party oracles, Underdog empowers market creators to resolve markets directly. To mitigate risks:

  • AI validates the resolution against external data feeds. Disputes can be flagged for community review (a future roadmap feature). Interactive AI Chatbot: Users can interact with an integrated chatbot powered by the custom-trained LLM to get suggestions, insights, and even tutorials on how to use the platform.
background image mobile

Join the mailing list

Get the latest news and updates