Binary Prediction Markets
Blink runs prediction markets on crypto price movements using Pyth oracle feeds. Each market is a simple question:“Will BTC’s price be higher or lower at the end of this market window than it was at the start?”Two outcome tokens are created for each market:
- YES token (UP) — pays $1.00 if the price closes higher
- NO token (DOWN) — pays $1.00 if the price closes lower
Market Lifecycle
- Created — Market window scheduled
- Active — Trading open. Buy/sell YES and NO tokens.
- Resolved — Window closes. Pyth oracle determines outcome.
- Redeemed — Winning tokens automatically redeemed for $1.00 USDC each.
Token Pricing
Prices are always between 0.99:
YES + NO always sums to ~$1.00 (minus spread). This is enforced by the MINT/MERGE mechanism:
- MINT: Buy YES at 0.40 = $1.00 → 1 YES + 1 NO minted
- MERGE: Sell YES at 0.40 = 1 YES + 1 NO burned → $1.00 returned
Order Types
Post-only: Add
post_only=True to reject orders that would match immediately. Useful for market makers who want to provide liquidity, not take it.
Amount Encoding
All amounts use 6 decimal places internally (matching USDC’s 6 decimals):
The SDK handles all conversions. Pass human-readable numbers (
price=0.50, size=20) and the SDK converts to raw amounts.
For BUY orders:
makerAmount= size × price × 1,000,000 (USDC you pay)takerAmount= size × 1,000,000 (tokens you receive)
makerAmount= size × 1,000,000 (tokens you give)takerAmount= size × price × 1,000,000 (USDC you receive)
Authentication
Blink uses the same two-level auth as Polymarket:Level 1 — EIP-712 (Wallet Proof)
Used once to create API credentials. Your wallet signs a typed data message proving ownership. The private key never leaves your machine.Level 2 — HMAC-SHA256 (Trading)
Used for every trading request. Four headers are required:
The SDK handles all signing automatically.
Settlement
Every matched trade is settled on-chain via the Base network:- Order matches in the matching engine (~1ms)
- Settlement TX submitted to Base (~100ms)
- TX confirmed on-chain (~2 seconds)
- CTF tokens minted/transferred to wallets
- Activity feed updated with on-chain TX hash
Resolution and Redemption
When a market’s window closes:- Pyth oracle provides the closing price
- Adapter contract compares open vs close price → determines UP or DOWN outcome
- CTF contract sets payout ratios (winning side = 0.00)
- Auto-redemption burns winning tokens and sends USDC to holders
- All happens typically within 30–60 seconds of market close

