Skip to main content

Leveraged Prediction Market Oracle Framework

Outcome’s HIP3 oracle derives a single fair probability by aggregating live prices from multiple venues, applying quality based weighting, and combining probabilities in log odds space.
OracleWeightWeight(%)
Polymarket660%
Kalshi330%
Outcome110%
These values may vary by contract, and oracle sources can be added, removed, or reweighted over time.

Price Aggregation Algorithm

The aggregation logic runs in real-time to compute the final index price. It employs a quality-adjusted weighting mechanism that dynamically penalizes venues with wide spreads or stale data.

Step 1: Probability Extraction

For each venue v, the system calculates the raw probability (pᵥ) based on the best available order book depth. pv=Best Ask+Best Bid2p_v = \frac{\text{Best Ask} + \text{Best Bid}}{2}
  • Clamping: To prevent asymptotic errors in log-space, probabilities are clamped:
0.001pv0.9990.001 \le p_v \le 0.999
  • Fallback: If no order book exists, the system defaults to the current_prices.yes value from the market data feed.

Step 2: Quality Scoring

A quality score (Qᵥ) is computed for each venue to determine its trustworthiness for the current tick. Qv=Base Trustv×(1ϵ+Spreadv)×FreshnessvQ_v = \text{Base Trust}_v \times \left( \frac{1}{\epsilon + \text{Spread}_v} \right) \times \text{Freshness}_v

Where:

  • Base Trustᵥ: Configurable weight per platform (Default: 1.0).
  • Spreadᵥ: Best Ask − Best Bid.
  • ε: 0.001 (smoothing constant to prevent division by zero).
  • Freshnessᵥ: Binary multiplier based on data age.
    • 1.0 if age < staleness_threshold
    • 0.0 if age ≥ staleness_threshold (venue is treated as dead)

Step 3: Dynamic Weight Normalization

Quality scores are converted into normalized weights (Wᵥ) for the final calculation. Wv=QvQallW_v = \frac{Q_v}{\sum Q_{\text{all}}} Guardrails: The system applies strict bounds to prevent any single venue from manipulating the price, provided multiple venues are live.
  • Cap: Wv0.75W_v \le 0.75
  • Floor: Wv0.25W_v \ge 0.25 (if venue is live/fresh)
  • Dead Venues: If a venue is stale, Wv=0W_v = 0
  • Single Source: If only one venue is live, Wv=1.0W_v = 1.0

Step 4: Log-Odds Aggregation

To preserve market sentiment accurately, probabilities are converted to Log-Odds space before averaging. This prevents arithmetic mean bias when averaging raw probabilities near 0 or 1.

1. Convert to Logits

logit(p)=ln(p1p)\text{logit}(p) = \ln \left( \frac{p}{1 - p} \right)

2. Weighted Average & Sigmoid

Final Price=sigmoid((Wv×logit(pv)))\text{Final Price} = \text{sigmoid} \left( \sum \left( W_v \times \text{logit}(p_v) \right) \right) Where: sigmoid(x)=11+ex\text{sigmoid}(x) = \frac{1}{1 + e^{-x}}

Calculation Example

Below is a simulated tick illustrating how dynamic quality scores adjust the final weight of each venue. Note that Outcome (in this specific example) is excluded from the calculation because the data age exceeds the staleness threshold.
VenuePvSpreadAgeFreshQuality score calculationNormalized weight (Wv)
Polymarket0.650.025s1 × (1 / 0.021) ≈ 47.60.67
Outcome0.630.0410s1 × (1 / 0.041) ≈ 24.30.33
Kalshi0.600.10120s0 (stale)0.00

Final Computation

Final=sigmoid(0.67×logit(0.65)+0.33×logit(0.63))\text{Final} = \text{sigmoid}\left(0.67 \times \text{logit}(0.65) + 0.33 \times \text{logit}(0.63)\right) Final=sigmoid(0.590)0.643\text{Final} = \text{sigmoid}(0.590) \approx 0.643

Configuration Parameters

ParameterDefaultDescription
Base Trust1.0The starting trust weight for a venue before spread adjustments.
Staleness Threshold60sThe maximum data age allowed before a venue is discarded.
ε (Epsilon)0.001A small constant added to the spread to prevent division by zero.
Max Weight0.75The maximum influence a single venue can have (when >1 live).
Min Weight0.25The minimum influence a live venue will retain.