Inspiration
Insider trading is already a major issue in financial markets, and prediction markets make it even harder to control due to regulatory gray areas and access to non-public political information. Recent U.S. government action, including proposed legislation after suspicious Kalshi trades and lawsuits against them, highlighting the severity of this problem. TradeGuard detects and flags potential insider trading in prediction markets before it causes real financial harm or erodes market trust.
References:
https://finance.yahoo.com/news/massachusetts-sues-kalshi-over-alleged-090608800.html
What it does
TradeGuard provides real-time surveillance for prediction markets, flagging suspicious trading behavior that may indicate insider information. Users can search any market, from crypto prices and elections to Federal Reserve decisions, and receive a clear 0–100 risk score based on factors like trade timing, abnormal volume, coordinated orders, and unusually precise price movements. Each alert includes a short explanation so traders, researchers, and regulators understand why a market looks risky and can decide whether to investigate further.
How we built it
Backend --> Node.js, Express, Kalshi API integration for real-time market data, trade history, and order books, plus a detection engine powered by 14 quantitative algorithms grounded in market microstructure research.
Frontend --> React.js, Three.js, interactive market search and visualization interface for viewing risk scores and flagged behavior.
AI --> We used Moorcheh to build a context-aware market data layer and integrated it with the Gemini API to reason over complex trading patterns and improve insider-risk detection accuracy.
ML/DataBases --> MongoDB for storing market analyses, user interactions, and feedback, enabling a continuous learning pipeline that improves the system’s ability to distinguish normal volatility from potential insider trading over time.
Challenges we ran into
Combining multiple signals into a single risk score: Our 14 detection algorithms produced outputs in different formats, so we built a weighted normalization pipeline in Node.js that converts each signal to a standardized 0–100 scale and fuses them using academically informed weights. This allowed us to generate a single, statistically meaningful risk score while preserving the contribution of each detection method.
Limited training data for AI models: Prediction markets lack labeled insider trading cases, making supervised training difficult. We addressed this by using unsupervised learning on our quantitative signals and continuously improving the model through user feedback and analysis context stored in MongoDB, while carefully validating results to limit false positives.
Accomplishments that we're proud of
We’re proud to have built a system that tackles insider trading in prediction markets, where even a small amount of abuse can lead to millions of dollars in unfair losses, by making advanced surveillance accessible beyond large institutions. At the same time, we implemented a continuous learning pipeline using MongoDB and Gemini-powered models that improves detection accuracy over time by learning from real-world usage and feedback.
What we learned
We learned how to train and refine an AI model using Moorcheh, which's a context-aware retrieval engine for systemic search, allowing our system to reason over market behavior more accurately. Integrating this pipeline with the Google Gemini API significantly improved signal interpretation, reduced false positives, and strengthened our insider-risk detection.
What's next for TradeGuard
We plan to implement a continuous monitoring algorithm that alerts users even after they have placed their trades if our algorithm detects any insider trading about to happen or any hints of it. Additionally, we're developing regulatory reporting capabilities and expanding to additional prediction markets like Polymarket to create a unified surveillance platform across the entire ecosystem.
Built With
- express.js
- google-gemini-api
- javascript
- kalshi-api
- mongodb
- moorcheh
- node.js
- python
- railway
- react
- recharts
- three.js
- typescript
- vercel
- vite

Log in or sign up for Devpost to join the conversation.