Optimistic Oracle

The Optimistic Oracle provides a faster, more economical alternative to the main DecentralizedOracle for answering questions. It works on an "optimistic" assumption: proposals are accepted as true unless challenged within a dispute window.

How It Works

1. Query Creation

Anyone can create an optimistic query by:

  • Paying 30,000 $TRUTH tokens (creation cost)
  • Providing a question and answer options as strings

2. Proposal Submission

Anyone can propose an answer by:

  • Staking 1,000,000 $TRUTH tokens as collateral
  • Selecting one or more options (or "no correct choice")

3. Dispute Window

  • After a proposal, there's a 1.5 hour dispute window
  • Anyone can dispute by staking 1,000,000 $TRUTH tokens
  • If no dispute occurs, the proposal is accepted

4. Dispute Resolution

If disputed:

  • The query escalates to the main DecentralizedOracle
  • 100,000 tokens from the wrong party funds the main oracle
  • The correct party receives rewards
  • Special "not clear yet" option can reset the query to awaiting state

Economic Incentives

Undisputed Resolution

  • Proposer receives: 1,000,000 collateral + 20,000 reward
  • Burned: 10,000 (remainder of creation cost sent to 0xdead)

Disputed - Proposer Correct

  • Proposer receives: 1,000,000 collateral + 900,000 from challenger + 20,000 reward
  • Burned: 10,000 (sent to 0xdead)
  • Main oracle funded: 100,000 from challenger's collateral

Disputed - Proposer Wrong

  • Challenger receives: 1,000,000 collateral + 900,000 from proposer + 20,000 reward
  • Burned: 10,000 (sent to 0xdead)
  • Main oracle funded: 100,000 from proposer's collateral

Disputed - "Not Clear Yet"

If main oracle resolves to "Not clear yet":

  • Challenger receives: 1,000,000 collateral + 900,000 from proposer = 1,900,000 (no 20k reward - not final resolution)
  • 30k creation deposit: Stays in contract for final resolution
  • Proposer receives: Nothing (lost collateral for proposing prematurely)
  • Query resets: Returns to awaiting state for future proposal when answer becomes clear
  • Note: The 20k reward stays in contract and will be paid to final resolver; 10k will be burned on final resolution

Key Features

Permissionless

  • Anyone can create queries
  • Anyone can propose answers
  • Anyone can dispute proposals

Fast Resolution

  • Undisputed queries resolve in just 1.5 hours
  • Much faster than waiting for main oracle voting periods

Cost Effective

  • Only 30,000 tokens to create (vs 100,000 for main oracle)
  • Proposal collateral returned if correct

"Not Clear Yet" Option

  • Challengers can dispute if the answer isn't determinable yet
  • If main oracle agrees, query returns to awaiting state
  • Allows for queries about future events with uncertain timelines

Option System

  • Options 0-253: Regular answer choices provided as strings (standard 0-based indexing, 2-254 options max)
  • "Not clear yet" option: When disputed, main oracle automatically adds this as the last option (at index N, where N = number of original options)
  • Empty array: "No correct choice"

Example

If you create a query with 3 options ["Yes", "No", "Maybe"]:

  • Optimistic oracle: Users can propose options 0, 1, or 2 (or empty array)
  • Main oracle (if disputed): Voters can choose options 0, 1, 2, or 3 ("not clear yet")

Contract Address

The OptimisticOracle contract is deployed at:

0xA83689161DFa9d5992fBa658d3148C6f72E1419E

View on BSCScan: 0xA83689161DFa9d5992fBa658d3148C6f72E1419E

Next Steps