Skip to main content
Orica combines the security of Solana smart contracts with the performance of a centralized indexer to deliver a seamless prediction market experience.

System Overview


On-Chain Components

Orica Program

Program ID: oEarJ8xDDssLcWwgkSpRVVbmiUyeDnoHFNAHPp6eetwHandles:
  • Market creation
  • Trading (buy/sell)
  • Redemption
  • Fee collection

Disputes Program

Program ID: oVEzkDiY2FZP4ADfCeUfrg8jgCoMnPcVQao99indSqNHandles:
  • Dispute initiation
  • Weighted voting
  • Message posting
  • Resolution override

Account Types


Off-Chain Components

Indexer Service

The indexer continuously monitors the Solana blockchain for:
  • New markets created
  • Trades executed
  • Market resolutions
  • Dispute activity
It parses transaction logs and account updates, then writes structured data to the database.
The indexer uses Solana’s WebSocket subscription to receive updates in real-time, typically within 1-2 seconds of block confirmation.

Public API

The API provides:
  • REST endpoints: Query markets, trades, disputes, and analytics
  • WebSocket streams: Real-time price updates and trade activity
All data served by the API is derived from the blockchain via the indexer.

AI Resolution System

The auto-resolver is a multi-agent AI daemon that monitors closed markets and autonomously determines outcomes: Key characteristics:
  • Parallel Processing: Up to 100 markets resolved simultaneously via semaphore-controlled concurrency
  • Hierarchical Agents: Primary orchestrator delegates to specialized sub-AI workers for scraping
  • Multi-Format Extraction: Sub-crawlers support markdown, JSON schemas, screenshots, and link discovery
  • Agentic Loops: Orchestrator runs up to 20 iterations; sub-AI scrapers run up to 5 iterations each
  • Immutable Proofs: Full reasoning chains persisted to IPFS via Pinata

Data Flow

1

User Signs Transaction

A user’s wallet signs a transaction (e.g., buy shares) and broadcasts it to Solana.
2

Program Executes

The Orica program validates the instruction, updates market state, and transfers tokens.
3

Indexer Receives Update

The indexer’s WebSocket subscription receives the confirmed transaction.
4

Database Updated

The indexer parses the transaction, extracts relevant data, and writes to PostgreSQL.
5

API Serves Data

Clients query the API and receive the updated data with low latency.

Why Use the API?

Querying Solana directly has limitations:
  • No complex queries: Can’t sort, filter, or aggregate efficiently
  • No historical data: Account state only shows current values
  • Rate limits: RPC nodes have strict call limits
  • Latency: Multiple RPC calls required for complete data
The Orica API solves these by providing:
  • Pre-computed aggregations (volume, trade count)
  • Historical snapshots (price history, trade history)
  • Efficient pagination and filtering
  • WebSocket streams for real-time updates

Security Model

While the API is trusted for data availability, all writes must go through the blockchain. The API cannot modify on-chain state.

Next Steps

On-Chain Programs

Deep dive into program instructions.

Indexer

Learn how the indexer processes data.