beginner
+100 XP

What is DeepBook Predict?

Discover binary options on Sui โ€” learn what prediction markets are, how positions work, and the four core on-chain objects that power DeepBook Predict.

Lesson Syllabus

Binary Options Basics
๐ŸŽฏ

What Are Binary Options?

A binary option is a financial contract that pays a fixed amount (1 DUSDC) if a condition is true at expiry, or nothing (0 DUSDC) if false. "Binary" means two outcomes โ€” win or lose, all or nothing. DeepBook Predict brings this on-chain with sub-second settlement on Sui.

๐Ÿ“ˆ

Position Types: UP, DOWN, RANGE

Every position is a bet on where the settlement price will land. UP bets the price will be at or above the strike. DOWN bets below. RANGE bets within a band. Positions are encoded using sentinel values for the lower and higher strike bounds.

๐Ÿ”‘

Sentinel Encoding

On-chain, every position is stored as a RangeKey with lower_strike and higher_strike. Special sentinel values represent infinity: NEG_INF = 0 means negative infinity, POS_INF = 2^64-1 means positive infinity. This elegantly encodes all three position types.

Protocol Architecture
๐Ÿ—๏ธ

Four Core On-Chain Objects

DeepBook Predict is built on four shared objects that live on the Sui blockchain. Each has a distinct responsibility โ€” understanding them is essential for building any Predict integration.

๐Ÿ“‹

Key Constants & Addresses

Every Predict integration uses a fixed set of contract addresses and constants. These identify the protocol objects on-chain and define the numerical encoding used for all prices and fees.

๐Ÿ“ฆ

Module Responsibilities

The Predict package is organized into modules, each with a specific job. Knowing which module does what is critical when building transaction calls โ€” you need the right target path.

Market Lifecycle
๐Ÿ”„

Oracle State Machine

Every market (oracle) progresses through four states. Understanding these states tells you what operations are allowed at each phase โ€” you can only mint on active oracles and redeem settled ones for payout.

๐Ÿ’น

Price Data on an Oracle

Active oracles receive continuous price updates from Pyth Lazer (high-frequency price feeds). The oracle stores both spot (current market price) and forward (expected price at expiry), which is derived from spot plus a basis adjustment.

๐Ÿ”

Trading Flow Overview

A complete trade goes through several steps: discover markets, select a position, compute the price, build a transaction, and submit it to the Sui network. After expiry, winning positions are redeemed for 1 DUSDC each.