The Bluff Event Oracle

The EventOracle is a smart contract designed to resolve prediction markets on the Bluff platform. It serves as an asynchronous bridge between a market's question and its on-chain outcome. The contract supports two resolution models: an AI-powered oracle and a user-designated oracle.

Core Workflow

All market resolutions follow the same general lifecycle:

  1. Registration: A market contract is registered with the oracle via the registerMarket function, which includes metadata such as the market question, resolution sources, and outcome options. This process generates a unique eventId.

  2. Resolution: An off-chain agent (either a network of AIs or a designated user) determines the outcome based on the registered information.

  3. Publication: The authorized oracle (or oracles) submits the result to the contract by calling publishOutcome.

  4. Settlement: The originating market contract can then query getOutcome to retrieve the final result and settle the market.

Oracle Types

The EventOracle contract supports two distinct modes for market resolution.

1. AI Oracle

The AI oracle model is designed for questions that require research and analysis of publicly available information.

Key Features:

  • Rich Metadata: Market creators can provide a detailed question, description, reference URLs, and suggestions for which Tool (e.g., DEEP_RESEARCH) and AIModel (e.g., GPT_4O) should be used for resolution.

  • Decentralized Resolution: The system relies on multiple authorizedOracles (trusted, off-chain AI agents) to submit their findings, rather than a single entity.

  • Consensus Mechanism: A market is finalized only after a configurable number of oracles (iterationsRequired) agree on the same outcome. This is designed to prevent a single faulty or malicious oracle from resolving a market incorrectly.

  • Update Requests: A user can pay a fee to call requestUpdate before a market is finalized, which prompts the AI oracles to re-evaluate the market.

This model is suited for markets where the outcome can be determined by analyzing news, official statements, and other forms of public data.

2. User-Designated Oracle

The user-designated oracle model provides a more direct resolution mechanism.

Key Features:

  • Single Source of Truth: The market creator specifies a single Ethereum address (designatedOracle) with the sole authority to report the outcome.

  • Immediate Finalization: The market is finalized as soon as the designatedOracle calls publishOutcome. No consensus mechanism is required.

  • Trust and Efficiency: This model is intended for markets where the outcome is determined by a trusted entity or can be verified by a specific on-chain event. For example, a market based on an on-chain price feed would use the price feed contract as the designatedOracle.

Market Management

The EventOracle includes the following management features:

  • Market Editor: An address can be designated as a market's editor during registration, which grants permission to update market details (e.g., description, reference URLs) before the market is finalized.

  • Renouncing Editorship: An editor can permanently renounce their editing privileges for a market by calling renounceMarketEditing.

This dual-oracle system allows Bluff to support a wide range of prediction markets, from those based on complex, real-world events to those based on simple on-chain data.

Last updated