Skip to content
@

@CanIBetOn

Bet on anything. Our AI agent launches betting pools for any topic. Outcomes are decided by AI via Chainlink Functions. Tag @CanIBetOn on X and you will be quoted with the link to your pool in ~30sec

Created on 1st March 2025

@

@CanIBetOn

Bet on anything. Our AI agent launches betting pools for any topic. Outcomes are decided by AI via Chainlink Functions. Tag @CanIBetOn on X and you will be quoted with the link to your pool in ~30sec

The problem @CanIBetOn solves

Current onchain betting markets suffer from two key issues:

  1. Permissionlessness
  2. Settlement

Permissionlessness

Popular prediction markets such as Polymarket rely on a team of manual reviewers to create new markets based on user requests. There is currently no way for users to launch arbitrary markets themselves, leading to unmet demand especially for niche proposition bets.

Settlement

All betting markets must rely on some entity or system for the final decision on which side has won. While solutions such as UMA provide a robust mechanism for determining the truth of a given proposition, it relies on a dispute resolution process which can be time-consuming and controversial. Furthermore, these solutions may struggle to scale to support thousands of individual bets per day.

Solution

Our agent solves both of these problems by enabling users to instantly launch betting pools directly from X posts and deciding bet outcomes via an AI oracle. By leveraging a ubiquitous and easy-to-use interface like X posts, anyone is now easily able to create a market for any bet without a manual approval process. Furthermore, utilizing an AI oracle to decide bet outcomes eliminates reliance on potentially-biased human arbiters or costly dispute resolution processes, while providing the potential for scalability which these solutions lack. By combining an instant bet creation with AI settlement, @CanIBetOn enables anyone to bet on anything.

User Interaction and Data Flow

Betting Pool Creation

  1. The user makes an X post on tagging the AI agent with a topic or specific proposition
  2. The AI agent receives the post and begins analysis.
    2.1 If the post provides a specific proposition, a new betting pool is created onchain for the proposition.
    2.2 If the post only provides a general topic, the agent will fetch recent news about the topic and generate a random new bet based on that context before creating the onchain betting pool.
  3. Once the betting pool is created onchain, the agent posts to X quoting the user’s original post, providing all betting pool details and a link to the frontend where anyone submit bets.

Submitting Bets

  1. Users can place bets by visiting the frontend by clicking a direct link from an X post or by browsing the list of available pools from the homepage.
  2. Once a user attempts to place their bet, if they are not yet signed in, they will be prompted to sign in with Privy.
    2.1 Users have the option to sign in with X, email, or using passkeys meaning that users can create accounts using Face ID on their phones or by leveraging an existing password manager.
    2.2 Signing in with Privy automatically generates an embedded wallet for the user which they are able to use to place bets.
  3. After signing in, users can place a bet by signing a message to permit a USDC allowance for the bet amount.

Deciding and Paying Out Bets

  1. To determine when to decide (ie: “grade”) and pay out a bet, the AI agent iterates through all open betting pools on a set interval to check if the conditions have been met for grading (ie: an event has occurred, a date has been reached, etc.).
  2. If the conditions to trigger grading have been met, the agent calls the smart contract function to grade the bet which sends a Chainlink Functions request to the decentralized oracle network.
  3. The oracle nodes then each run the verification, reaching consensus on the outcome for the bet before returning the winning option to the contrac

The project architecture and development process

Sponsors/Key tech

Product Integrations

AI Agent

The AI agent was built using Langchain, GPT-4o, and Perplexity; it also uses Tavily for gathering real world real-time context data for generating and grading bets. Additionally, we also implemented support for launching betting pools directly from Telegram as we learned during live user testing that some users were hesitant to post betting pools from their public X accounts.

Frontend

The frontend was built using Next.js and is deployed to Vercel. It is supported by a custom blockchain indexer deployed to The Graph. Privy was used as the wallet provider to provide a “Web2-like” experience for interacting with the protocol and completely abstracting away any blockchain complexities.

Onchain Components

The smart contract is currently deployed to Base Sepolia and Base Mainnet, however only the Base Sepolia testnet deployment has been made available to users at this time. Additionally, Chainlink Functions provides decentralized, trustless infrastructure for LLM queries to grade bets. We also leveraged the EIP-2612 standard for gasless token approvals so that users only need to hold USDC to interact with the protocol. A mock deployment of the USDC contract was used on testnet such that we can automatically mint tokens to users for testing.

Key differentiators and uniqueness of the project

Our project takes inspiration from Polymarket for the concept of onchain betting markets, as well as Clanker which is an AI agent that allows users to automatically launch custom tokens via social media posts tagging the agent account.

The key differentiators from Polymarket are:

  • Enables anyone to create a betting pool based on any topic or decidable statement
  • Instantly creates betting pools without manual approval
  • Eliminates dependence on potentially-biased human arbiters
  • Provides infrastructure for grading bets at scale

The key differentiators from Clanker are:

  • Creates betting pools instead of tokens, which are more familiar and accessible to traditional Web2 users, providing significantly higher potential for onboarding more normies
  • Utilizes a more sophisticated AI agent to generate betting pools, determine when to grade bets, and grade bet outcomes

Additionally, we sought to set ourselves apart from many Web3 projects by completely abstracting away any blockchain complexity, providing users a simplified experience similar to many Web2 sports betting platforms that anyone can figure out how to use in under 30 seconds. Users are never prompted to connect to an existing Web3 wallet, manage their own transactions and gas, or directly interact with any tokens; they only need 2 clicks to place and confirm their bets. Furthermore, users don’t even need to create a new account as they can leverage an existing email address, passkey or X account for a seamless login experience. Finally for the mainnet deployment, the integrated Coinbase Onramp in Privy allows users to easily deposit funds using only a debit card or Apple Pay.

Trade-offs and shortcuts while building

The most significant simplification we made was ignoring many of the complexities of market-making and implementing something akin to an “order book” model for matching bets instead of an AMM model. This is why we implemented betting pools instead of continuous prediction markets. We made this simplification because we knew developing robust market-making logic would have significantly increased the scope. Furthermore, we also knew that there are already existing market-making techniques utilized by Polymarket and other protocols; therefore we preferred to focus on demonstrating novel functionality as opposed to replicating features from other products that we know we can add in the future.

Another simplification we made on the testnet deployment is running our AI grading logic in our centralized backend and having Chainlink Functions query a backend endpoint to get the result instead of running the LLM grading queries directly on the decentralized oracle network. While it is fully possible to implement the required logic entirely within Chainlink Functions, this would have added complexity when debugging due to the lack of access to logs within the Functions runtime and increased friction when deploying updates. However, as the AI logic is finalized, it can be implemented for the Chainlink Functions runtime on the mainnet deployment to ensure trustlessness and transparency.

Additional Features

This is a new project that our team started building during the BUIDLathon.

Tracks Applied (1)

Build an AI-powered app on Base

We have deployed our application to base and have been using its fast block times and cheap gas prices to create a web2-...Read More
Base

Base

Discussion

Builders also viewed

See more projects on Devfolio