Horizon is a next-generation prediction market platform built on the Stellar blockchain, leveraging Soroban smart contracts and Zero-Knowledge (ZK) proofs to ensure trader privacy while providing high-fidelity market intelligence.
- ๐ Project Description
- ๐ฅ Video Demo
- โจ Key Features
- ๐ฅ Level 6: Black Belt - Agentic Evolution
- ๐๏ธ Architecture
- ๐ Smartcontract Details
- ๐ Project Vision
- ๐ Future Scope
- ๐ผ๏ธ UI Screenshots
- ๐ User Onboarding & Feedback
- ๐๏ธ Level 6 Requirements Checklist
- ๐ Getting Started
- ๐ ๏ธ Tech Stack
- ๐ Project Structure
Horizon redefines prediction markets by prioritizing user privacy and data integrity. By integrating Zero-Knowledge Proofs (ZKPs) on the Stellar Network, Horizon allows users to take positions on global events without revealing their specific bets until the market is resolved. This prevents front-running and manipulation, creating a fairer ecosystem for all participants.
Experience Horizon in action:
Watch the full walkthrough of the Privacy-First Prediction Market on Stellar.
- ๐ Privacy via ZK Proofs: All bets are placed as ZK commitments. Positions remain private until the "Reveal" phase.
- โก Stellar/Soroban Integration: High-speed, low-cost settlement using Stellar's latest smart contract engine.
- ๐ Intelligence Dashboard: Real-time analysis of market quality, risk scores, and sentiment trends.
- ๐ก๏ธ Secure Escrow: Non-custodial escrow contracts manage user funds with cryptographic certainty.
- ๐ Manipulation Detection: Automated systems flag suspicious trading patterns to ensure market health.
- ๐ค Agentic Market Discovery: Autonomous AI agents identify trends and resolve markets using real-world data feeds.
Horizon has evolved into a production-grade Agentic Market Intelligence System. This transition introduces autonomous lifecycle management for markets, driven by specialized AI agents and distributed background workers.
Horizon features a sophisticated multi-agent pipeline that transforms raw global data into executable on-chain markets with zero manual intervention.
- ๐ Deep Semantic Research: Agents utilize SerpAPI and Gemini 3 Flash to ingest real-time news, identifying emerging trends and assigning "Intelligence Scores" to potential market topics.
- ๐๏ธ Agent Framework: A hybrid Python-Node.js architecture designed for seamless AI integration and high-performance worker coordination.
- โ Self-Validating Resolutions: The system autonomously cross-references high-authority sources to verify event outcomes before triggering the Soroban smart contract for resolution.
The backbone of Horizon's reliability is a distributed, Redis-driven orchestration layer that ensures the platform remains responsive under extreme loads.
- ๐ฏ Distributed Job Orchestration: Leverages BullMQ on Upstash Redis to decouple heavy AI computation from the main API thread, maintaining a 99.9% uptime for the user terminal.
- ๐ก Global State Relay: Real-time propagation of market status, scores, and resolution events across distributed worker nodes and the frontend terminal.
- ๐ก๏ธ Rate-Limit Resiliency: Native Redis primitives ensure platform stability and protect against data inconsistency during high-throughput trading events.
The interface has been reimagined as a "Glow-Terminal"โa premium, data-dense experience designed for the professional trader.
- โจ Aesthetic Excellence: Built with a custom Glow-Card System, featuring curated HSL-tailored colors, smooth CSS micro-animations, and glassmorphic overlays that create a sense of depth and focus.
- ๐ Zero-Knowledge UX: Simplifies the complexities of ZK-proof generation into a seamless, 3-step workflow that ensures privacy without sacrificing speed or intuition.
- ๐ Interactive Vibe: Hover-triggered lighting effects and fluid, interactive dashboards create an interface that feels "alive," responding dynamically to every trader interaction.
Horizon now implements Stellar Fee Bump transactions! This allows users to place ZK bets completely gas-free. Our custom Relayer API handles the transaction submission and fee sponsorship.
graph TD
subgraph Client ["Frontend (Next.js)"]
UI["Horizon Terminal"]
BM["BetModal (ZK Proof Gen)"]
AP["Admin Panel (Bet Management)"]
F["Freighter Wallet"]
end
subgraph Backend ["Server (Next.js API)"]
API["REST API (/api/bets, /api/markets)"]
Auth["Stellar Auth"]
Relay["Relayer Service"]
end
subgraph Agents ["Agentic Market Engine"]
Worker["BullMQ Worker (Node.js)"]
AE["Agent Engine (Python/Gemini)"]
TD["Topic Discovery"]
MR["Market Resolver"]
end
subgraph Storage ["Data Layer"]
DB[("PostgreSQL (Prisma)")]
Redis[("Redis (BullMQ)")]
LS["localStorage (ZK Portfolio)"]
end
subgraph Blockchain ["Stellar Network"]
SC["Soroban Smart Contracts"]
Ledger["Stellar Ledger"]
end
%% Interactions
UI --> BM
UI --> AP
BM -- "1. Generate Proof" --> BM
BM -- "2. Sign Transaction" --> F
F -- "3. Submit to Chain" --> SC
SC -- "4. Emit Event" --> Ledger
Ledger -- "5. Index Event" --> Relay
Relay -- "6. Update DB" --> DB
API -- "Fetch Data" --> DB
UI -- "Request Data" --> API
BM -- "Store Nullifier" --> LS
%% Agentic Flow
API -- "Enqueue Job" --> Redis
Redis -- "Pull Job" --> Worker
Worker -- "Call" --> AE
AE -- "Search & Analyze" --> TD
AE -- "Resolve Markets" --> MR
TD -- "Auto-Create" --> API
MR -- "Submit Resolution" --> SC
Horizon's core logic is governed by a Soroban smart contract deployed on the Stellar Testnet.
- Contract ID:
CAIU27X7UNPW3ZOG27CQAFNZODL3F2DFVZRBUZS6G2NFX7WWANBXN356 - Network: Stellar Testnet
- Explorer: Stellar.Expert View
Horizon's mission is to build the world's most trusted, private, and intelligence-driven prediction market ecosystem. We believe that Privacy is a Human Right, and in the realm of prediction markets, it is the key to preventing manipulation and ensuring that the "Wisdom of the Crowd" is truly unbiased.
- Decentralized Truth: Leveraging Stellar's immutable ledger to create a transparent source of record for global events.
- Privacy by Default: Using Zero-Knowledge Proofs to protect individual strategies and positions.
- Intelligence-First: Moving beyond simple betting to provide high-fidelity sentiment analysis and risk metrics.
- Global Empowerment: Providing anyone, anywhere, with the tools to hedge against future uncertainty.
The journey has just begun. Our roadmap for the next 12-18 months includes:
- ๐ค Horizon AI Curator: Integrating Large Language Models to automatically create markets from real-time news feeds and manage liquidity.
- ๐ Cross-Chain ZK-Rollups: Expanding Horizon's privacy primitives to Ethereum, Polygon, and beyond via decentralized bridges.
- ๐ฑ Mobile-Native Experience: A high-performance mobile app featuring biometric-secured ZK proof generation and instant push alerts.
- ๐ฆ Institutional Liquidity Pools: Specialized vaults for market makers and institutional hedgers with advanced risk management tools.
- ๐ฐ๏ธ Decentralized Oracle Network: A bespoke oracle system utilizing multi-party computation (MPC) for automated and dispute-free resolutions.
- ๐ฎ Gamified Prediction Tiers: Introducing reputation-based tiers, social trading leaderboards, and ZK-verified performance badges.
We value community input and actively iterate on our platform based on user experiences. We have scaled to 30+ verified active users.
| User Name | User Email | User Wallet Address | User Feedback | Commit ID |
|---|---|---|---|---|
| Sumit Sarkar | sumit087@gmail.com |
GAVAIWLB3PBWMVKPDHLDVRAS7VH4DA2SXW3W2G7V5QLJ6DK3HY3AJVAN |
Reduce the loading time of the app | 8512a70 (Local Caching for faster loading) |
| Rohit Acharya | rohitacharya25@gmail.com |
GCFJQCTGFO5QXE5F6TYFRARFDX3O2GXSJ56N37ZBEX4V5LQYQKU54IQH |
ADD Live Trading Events that are most recent | d394fc9 (Agentic AI implementation for live events) |
| Deep Saha | sdeep027@gmail.com |
GAPZFL43CLQZUZTVH4XGC7XPY7WGWD7RI2D4E2IQGFDFVYZN4BI7GMVL |
AI Probability score shows wrong | 8e9234c (Fixed agent pipeline and probability logic) |
| Nilarpan Jana | nnilarpan@gmail.com |
GCQM3XP3IWUY3LCPDIP4QRLB7VIL2DY2QLZJ2KG2NANWUAFAZ3ULECUQ |
UX can be improve | 467815a (Improved dashboard visuals & UX) |
| Subhrajit Mandal | subhrajitmandal2k@gmail.com |
GAKD4A6VJLWXN2WOD4ICDECH7DUTPTKMXXR522P2S6WS4LTA5WQKPNO6 |
The UI is clean, just fix minor bugs | d4ddcef (Updated dashboard and fixed minor UI errors) |
Based on the collected user feedback in our Level 6 cohort, we plan to evolve the project with the following updates:
- Live Trading Events: Users requested more real-time notifications and live events for recent markets. We will introduce WebSocket-driven market subscriptions in our next iteration (Commit tracking:
931e9a3). - Further Performance Tweaks: We will introduce a more optimized WASM client to address mobile loading speed concerns raised by users (Commit tracking:
7e0ec4b). - Enhanced Advanced AI Modeling: Updating the Python agents to provide better AI probability accuracy out-of-the-box (Commit tracking:
56c9ffc). - Community Features: Adding a portfolio tracker and chat/forum capabilities to enhance the trader experience (Commit tracking:
f42bf0c,bc89083).
- 30+ verified active users: Onboarded and tracked via Google Sheets.
- Metrics Dashboard Live: Track DAU, transactions, and retention.
- Security Checklist Completed: View Security Checklist
- Monitoring Active: System health and RPC metrics are actively monitored.
- Data Indexing Implemented: Custom Relayers + Prisma Postgres sync.
- Full Documentation: Present in this README.
- Community Contribution: Twitter Post (Horizon Agentic Release)
- Advanced Feature Implemented: Fee Sponsorship (Gasless transactions via fee bump)
- Minimum 15+ Meaningful Commits: Maintained actively.
Horizon now implements Stellar Fee Bump transactions! This allows users to place ZK bets completely gas-free. Our custom Relayer API handles the transaction submission and fee sponsorship.
As part of scaling our product and engaging the broader Stellar ecosystem, we actively promoted Horizon on our social channels!
- Node.js 20+
- PostgreSQL instance
- Freighter Wallet extension
-
Clone the repository:
git clone https://github.com/Subho4531/eventhorizon.git cd eventhorizon -
Install dependencies:
npm install
-
Environment Setup: Copy
.env.exampleto.envand fill in your credentials:cp .env.example .env
-
Database Migration:
npx prisma migrate dev
-
Run the development server:
npm run dev
Horizon is built using a modern, high-performance stack optimized for security and scale.
โโโ app/ # Next.js App Router (Pages & API)
โโโ components/ # Reusable UI components
โโโ contracts/ # Soroban Smart Contracts (Rust)
โโโ lib/ # Shared utilities & blockchain logic
โโโ prisma/ # Database schema & migrations
โโโ public/ # Static assets
โโโ scripts/ # Deployment & maintenance scripts
โโโ tests/ # Unit & integration tests
We welcome contributions from the community! Whether you're fixing a bug, suggesting a feature, or improving documentation, your help is appreciated.
- Fork the repository.
- Create a branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project is licensed under the MIT License.
Made with โค๏ธ for the Stellar Ecosystem













