Inspiration
The 2026 FIFA World Cup lit up more than just stadiums, it is MASSIVE in prediction markets across platforms like Polymarket and Kalshi, where millions of dollars flowed into bets on match outcomes, goal scorers, and bracket progressions.
Watching those markets move in real time made us genuinely curious: why do people participate, and how do these prices actually form? Most existing platforms felt inaccessible or purely speculative. We wanted to build something closer to home, a prediction market tailored to UCF students, where real campus events, sports games, and university milestones become the questions.
Knightshi was born from the World Cup.
What it does
Knightshi is a campus-scale prediction market platform for UCF students.
Users can browse open markets on real events: UCF football outcomes, club election results, or academic announcements, in all that you can now trade a YES/NO shares using virtual currency.
Prices shift dynamically via an Automated Market Maker (AMM), so the probability displayed on each market is a live, crowd-sourced consensus.
An integrated Gemini-powered insight engine surfaces AI-generated summaries and analysis for each market to help users make informed predictions rather than blind guesses.
How we built it
The backend is a FastAPI application served by Uvicorn, structured around clean REST endpoints with Pydantic v2 models for strict request/response validation and settings management
The frontend is built in TypeScript and lives in a separate /frontend directory, consuming the FastAPI backend via httpx
- We used SQLAlchemy 2.0 for our ORM layer with Alembic handling all schema migrations, backed by a PostgreSQL database hosted on Supabase
- Authentication is handled through Google OAuth, which issues app-level JWTs using python-jose and authlib keeping onboarding frictionless for UCF students with their .edu Google accounts
- The AI insight layer calls Gemini (gemini-2.5-flash) via the google-genai SDK server-side to generate contextual market summaries
- We deployed to Railway using a nixpacks.toml build configuration
Challenges we ran into
Getting the frontend design right: Building a UI that made prediction market concepts, share prices, probability curves, and order history, feel intuitive to students who had never traded before was harder than expected. Translating financial data into clean, readable components in TypeScript while keeping the layout responsive across screen sizes took far more iteration than we anticipated.
AMM math under pressure: Implementing a correct constant-product AMM that handles edge cases (very low liquidity, all-or-nothing markets resolving) required careful unit testing with pytest and multiple refactor passes to ensure no free-arbitrage exploits existed.
Accomplishments that we're proud of
A fully functional AMM that correctly prices YES/NO shares and updates market probabilities with each trade
Live Gemini market insights that actually add signal, summarizing recent event news and crowd sentiment rather than just echoing the current probability.
A clean TypeScript frontend with real-time price feedback that makes the trading experience feel intuitive
What we learned
How to deploy on Railway, configuring nixpacks.toml for a Python/FastAPI service, wiring environment variables securely through Railway's dashboard, and using railway.toml to define the start command and health check routes so deploys go live without manual intervention.
Supabase's service-role client is powerful but needs to be strictly server-side gated; exposing it client-side would be a critical security hole.
How to structure a FastAPI project for scale from day one separating routers, services, models, and schemas so the codebase stays navigable under hackathon speed.
What's next for Knightshi
Expanded event coverage, pulling in UCF athletics schedules, SGA election calendars, and RateMyProfessor signals as automatic market seeds.
Social layer, leaderboards, trader profiles, and a reputation score so the best predictors on campus become known.
Mobile app, a React Native client so students can trade from their phones between classes.
Better resolution oracles, automated market resolution via verified data feeds rather than manual admin intervention.
Built With
- alembic
- fastapi
- gemini
- jwt
- railway
- sqlalchemy
- supabase
Log in or sign up for Devpost to join the conversation.