Exchange from Natural Language to Prediction Markets by using vector database.
Prize Pool
Vector Market is a new protocol designed to solve existing prediction market problems. We are currently experimenting with collecting data from major prediction market platforms like Polymarket and Kalshi, managing them in a vector space. Specifically, we store prediction market data in Supabase's vector database, organizing and classifying markets based on semantic similarity. In this process, we utilize Large Language Models (LLMs) to vectorize market descriptions, enabling efficient identification of similar markets. Technically, we're implementing smart contracts based on the ERC1155 standard, building a system where anyone can create conditional tokens. We're also developing functionality to automatically connect similar markets written in different languages and efficiently aggregate liquidity. Our current prototype uses pre-collected data, but ultimately we aim to build a system that can fetch data from each platform in real-time and automatically create and manage markets. While implementing the vector database has revealed more complex challenges than initially expected, we believe integration with LLMs will enable more accurate market matching and classification. This system will prevent market fragmentation while enabling efficient price discovery and liquidity provision, presenting a new form of prediction markets. The key innovation is how we manage market data in vector space, allowing us to automatically connect similar markets across languages and platforms, ultimately solving the liquidity fragmentation problem that plagues current prediction markets.
We developed our protocol using Solidity smart contracts based on ERC1155 for conditional tokens, with Hardhat for testing and deployment. The core innovation is our vector database implementation using Supabase with pgvector, which allows us to store and match similar markets efficiently. For this hackathon demo, we're simulating the actual market matching system using LLM embeddings and pre-collected data to demonstrate the concept. While the production version would connect to real prediction markets like Polymarket and Kalshi in real-time, our demo shows how the vector space management of markets would work through this simplified implementation. For the frontend, we used Next.js and TailwindCSS, integrating web3 functionality through Wagmi hooks and RainbowKit for wallet connections. Our smart contracts include a novel liquidity routing system that automatically distributes liquidity across similar markets based on their needs. Partner technologies like Supabase's pgvector integration and OpenZeppelin's contract components were crucial in building a secure and efficient system. The end result demonstrates how our protocol could effectively solve market fragmentation while maintaining high performance in a real-world implementation.