Skip to main content

Overview

Mayybee uses the UMA Optimistic Oracle to resolve prediction markets in a trustless, decentralized manner. This ensures fair outcomes without relying on a single centralized entity.

Resolution Flow

  1. Market ends → 2. Outcome proposed → 3. Challenge period → 4. Resolution finalized

How Resolution Works

Step 1: Market Creation

When an admin creates a market, a price request is sent to the Optimistic Oracle via the UmaCompatibleCtfAdapter contract.
function initialize(
    bytes memory ancillaryData,  // Question data
    address rewardToken,
    uint256 reward,
    uint256 proposalBond,
    uint256 liveness
) external returns (bytes32 questionID);

Step 2: Outcome Proposal

After the market ends, a proposer submits the outcome:
Price ValueOutcomePayout Array
1e18YES[1, 0]
0NO[0, 1]
0.5e18UNKNOWN[1, 1] (50/50 split)

Step 3: Challenge Period

Anyone can dispute the proposed outcome during the liveness period. If no dispute is raised, the outcome is accepted as truth.

Step 4: Resolution

The admin calls resolve() to finalize the market and distribute payouts:
function resolve(bytes32 questionID) external;

Dispute Resolution (UMA DVM)

When a dispute is raised, it escalates to UMA’s Decentralized Verification Mechanism (DVM). UMA token holders vote on the correct outcome.

Dispute Timeline

PhaseDurationDescription
Commit24 hoursVoters submit hashed votes
Reveal24 hoursVoters reveal actual votes
Total48-96 hoursFull dispute resolution

Bond Requirements

  • Proposers must post a bond to propose an outcome
  • Disputers must post an equal bond to challenge
  • Winner receives their bond back + portion of loser’s bond
  • Incorrect voters are slashed (lose staked UMA)

How to Submit a Dispute

1

Access UMA dApp

2

Find Proposal

Navigate to the “Verify” tab and find the proposal
3

Post Bond

Submit your dispute bond to challenge the outcome
4

Wait for Voting

DVM voting takes 48-96 hours

Contract Functions

UmaCompatibleCtfAdapter

The main oracle adapter that bridges UMA with the Conditional Tokens Framework.
// Create a new question
function initialize(
    bytes memory ancillaryData,
    address rewardToken,  // Must be 0xdead
    uint256 reward,       // Must be 0
    uint256 proposalBond, // Must be 0
    uint256 liveness      // Must be 0
) external returns (bytes32 questionID);

IOptimisticOracleV2

function requestPrice(
    bytes32 identifier,      // YES_OR_NO_IDENTIFIER
    uint256 timestamp,
    bytes memory ancillaryData,
    IERC20 currency,
    uint256 reward
) external returns (uint256 totalBond);

Emergency Resolution

Only use when the Optimistic Oracle fails or in extreme circumstances. This bypasses the decentralized resolution process.

Requirements

  • Caller must be an admin (onlyAdmin modifier)
  • Question must be initialized
  • Valid payout array must be provided

When to Use

  • Oracle is unresponsive for extended period
  • Clear oracle malfunction or manipulation
  • Extreme market conditions
  • Legal or regulatory requirements

Safety Period

EMERGENCY_SAFETY_PERIOD = 2 days

Troubleshooting

Submit a dispute through the UMA OO dApp before the liveness period ends. Post the required bond and wait for DVM voting.
Check if hasPrice() returns true. If yes, call resolve(). If no, wait for the liveness period or check for active disputes.
After the emergency safety period (2 days), admins can call emergencyResolve() with the correct payout array.
If you believe the DVM vote was manipulated, escalate to UMA governance. The DVM is designed to be manipulation-resistant through economic incentives.

Contract Addresses

UmaCompatibleCtfAdapter

0x1Ea9a6086724D8e15933b911b2095aa249475D48View on BSCScan

UmaCtfAdapterNegRisk

0xa92DDe2473b02eDc02DAB845518A68B3EaBbe1BbView on BSCScan

External Resources