project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

TrendMarket

TrendMarket is an innovative prediction market using LLM technology to create and execute markets with minimal human involvement. It addresses liquidity fragmentation by having LLMs select popular markets and automatically determine outcomes through multi-LLM voting.

TrendMarket

Created At

ETHGlobal Singapore

Winner of

Airdao - Prediction Market on AirDAO 1st place

Worldcoin - Best Use of World ID 1st place

Project Description

What We Are Solving:

  • The quality and liquidity issues in prediction markets
  • Many trust points
  • Addressing execution problems

In prediction markets, there exists a dilemma between the quality/quantity of markets available and the fragmentation of liquidity. While markets should leverage user preferences to create appealing opportunities, the more markets that are created, the more liquidity gets fragmented, leading to a poor user experience. We solve this problem by utilizing AI-driven curation.

Another issue in existing prediction markets is the presence of trust points in every aspect—market creation, matching, and execution (e.g., Polymarket's operations). These markets rely heavily on human intervention. In contrast, our product enables likely fully on-chain transactions without the involvement of malicious actors, covering everything from market creation to trading and closing.

Additionally, existing prediction markets often use oracles like Chainlink or UMA. However, these oracles cannot be considered fully trustless. Since they rely on trusted nodes or token-based decision mechanisms, they cannot fundamentally prevent attacks when there is a market with returns that outweigh the cost. We address this issue by using a collective decision-making process powered by multiple AIs.

Overview of the Application:

This application is divided into three main components: the creation of market topics for the prediction market, the AMM contract where users buy and sell tokens, and the integration of proposal outcomes determined by LLMs.

For the AMM contract, we have implemented the CPAMM, which is commonly used in prediction markets. The creation of proposals and the determination of their outcomes are handled by LLMs, eliminating the influence of malicious actors or staking-based manipulation.

Application Details:

The involved entities are the market creators, prediction market participants, as well as the LLM and the AMM smart contract.

  1. Prediction Market Creation

    1. The Problem of Quality and Quantity of Markets Created by Internal Staff
      • Based on news available on the web, the LLM proposes topics for the prediction markets. The AI curates information from the web and designs the topics. Users then select a topic from this list to deploy, creating a corresponding prediction market. The user who creates the prediction market receives a share of the revenue generated.
      • It is important to note that the market creator must pay a fee in USDC for using the LLM.

    b. Preventing Liquidity Fragmentation

    • To prevent excessive market proliferation and liquidity decline, markets with low popularity are designed to be forcibly closed.
    • Additionally, by using conditional tokens, the liquidity that would otherwise be fragmented in a typical ERC-20 AMM can be concentrated more effectively.

    c. Market Details Setup

    • Users set up the following using the LLM:
      • Topic
      • Rules
      • Execution date
  2. Token Trading via AMM

    1. Using a CPAMM (constant product AMM), we have implemented collateral deposits and the buying and selling of Yes and No tokens, allowing everything to be executed on-chain.
    2. A portion of the fees is distributed to the market creator. However, this creates a disincentive for market creators to deploy unpopular topics, as initial fees might be wasted. By designing a mechanism based on these incentives and disincentives, we ensure both quality and liquidity on the prediction market platform.
    3. Outcome Execution
      • The execution is expected to be carried out through voting by the LLM.
      • After the trading period ends, the LLM automatically gathers data from the web and outputs the outcome of the topic (whether it is true, false, or indeterminable). The final outcome is determined through a consensus process involving multiple AI models.
  3. Existing prediction markets often rely on oracles like Chainlink and UMA. Chainlink is operated by trusted third-party nodes, and information is updated quickly, with nodes building reputation. On the other hand, UMA uses an Optimistic Oracle, where participants vote using UMA tokens if there is opposition within a set period. However, neither Chainlink nor UMA can be considered fully trustless. Whether due to node trust or token-based voting, they cannot fully prevent attacks if a market exists where the returns exceed the cost. We solve this issue by using a consensus-driven approach involving multiple Als.

How it's Made

To build this prediction market, I implemented a Constant Product AMM in Solidity, referencing Uniswap V2's AMM. The created contracts were deployed on both AirDAO and Ethereum testnets, and I accessed their information using Dynamic and ether.js. A particularly notable and innovative feature is the dynamic market generation system that utilizes the OpenAI API. This system automatically generates markets from news articles and deploys them on the blockchain. This allows us to provide prediction markets based on the most current topics. The project combines various technologies, including Solidity for smart contract development, blockchain networks (AirDAO and Ethereum testnets) for deployment, Dynamic and ether.js for interfacing with the blockchain, and the OpenAI API for generating market content. The integration of AI-powered market generation with blockchain technology is a unique aspect of this project, enabling real-time creation of relevant prediction markets based on current events.

background image mobile

Join the mailing list

Get the latest news and updates