Blink Market — A Binary Prediction Market Protocol on SuiBlink Market:Sui 上的二元預測市場協議

Blink Market — A Binary Prediction Market Protocol on SuiBlink Market:Sui 上的二元預測市場協議

Blink Market:Sui 上的二元預測市場協議
In short摘要

Blink Market is a binary prediction market on Sui that pairs off-chain RFQ quotes from a professional market maker with atomic on-chain settlement.Blink Market 是建於 Sui 的二元預測市場協議,結合鏈下專業造市商的 RFQ 報價與鏈上原子結算。

What It Is

Blink Market is a binary prediction market protocol on the Sui blockchain, and one of a few Sui-based financial applications I’ve built — alongside BlueLink, a blue bond tokenization platform. Users trade on binary outcomes — YES or NO — and each successful trade creates an on-chain position that can be redeemed for its full notional value if the selected outcome wins.

Traditional prediction-market AMMs often struggle with poor capital efficiency, slippage, fragmented liquidity, and difficult market bootstrapping — limitations that are especially visible in short-lived or specialized markets, where liquidity providers may not want to lock capital in a pool. Blink Market replaces the AMM pricing curve with professional off-chain quoting: a Professional Market Maker (PMM) prices trades off-chain using off-chain information and risk models, while custody, collateral, settlement, and payouts stay verifiable on-chain.

My Role

I worked on the backend and the Sui Move contracts — the Go PMM server and the Move 2024 modules described below.

How It Works

Blink Market uses a hybrid architecture — off-chain RFQ pricing, on-chain settlement:

  1. A user requests a quote from the Go-based PMM server.
  2. The PMM pricing engine calculates a price in basis points.
  3. The server assigns a sequence number and expiration time.
  4. The quote is encoded and signed with an Ed25519 key.
  5. The user submits the quote and payment to the Sui smart contract.
  6. The contract verifies the signature, expiration, PMM identity, and sequence number.
  7. User and PMM collateral are combined in the market pool.
  8. A Sui Position object is minted to the user.
  9. After resolution, winning positions can be redeemed on-chain.

The smart contracts are written in Move 2024 and split into modules for market management, RFQ execution, collateral accounting, fee calculation, administration, and events. The PMM server is written in Go and handles quote generation, signing, sequence persistence, rate limiting, and quote archiving through the /v1/quote API.

A few things I’d call out about the design:

  • Each trade only requires the collateral needed to cover its specific payout, rather than locking capital in a shared pool.
  • Every successful trade mints a transferable, wallet-owned Sui Position object, so ownership and redemption rights are on-chain and verifiable.
  • Quotes are cryptographically bound to a market, side, size, price, PMM, sequence number, and expiration time; PMM public keys are cryptographically bound to their Sui addresses, expiration timestamps prevent stale quotes from being executed, and strictly increasing sequence numbers prevent replay.
  • The Go server reproduces the contract’s exact 97-byte signed-message format, verified through golden test vectors, so the off-chain and on-chain sides stay in lockstep.
  • Collateral movement and position creation are atomic — they succeed or fail together — and smart-contract-enforced collateralization guarantees every winning position can be redeemed for its stated notional value.
  • Signed quotes are archived for auditability, but archival failures don’t block quote delivery.

What’s Next

The PMM server currently prices markets with configurable reference pricing, but it’s built with a pluggable pricing architecture — it exposes an interface for swapping in market-driven pricing engines later.

這是什麼

Blink Market 是建構在 Sui 區塊鏈上的二元預測市場協議,也是我做過的幾個 Sui 金融應用之一,另一個是藍色債券代幣化平台 BlueLink。使用者針對二元結果下單——YES 或 NO——每一筆成交都會在鏈上建立一個部位;若所選結果勝出,該部位可依全額名目價值贖回。

傳統預測市場的 AMM 常受困於資本效率不佳、滑價、流動性分散與市場冷啟動困難,這些限制在短期或利基市場特別明顯,因為流動性提供者未必願意把資金鎖在池子裡。Blink Market 以專業的鏈下報價取代 AMM 的定價曲線:專業造市商(PMM)在鏈下運用鏈下資訊與風險模型定價,而託管、抵押、結算與支付則留在鏈上、可被驗證。

我的角色

我負責後端與 Sui Move 合約——Go 寫的 PMM 伺服器,以及下面提到的 Move 2024 模組。

如何運作

Blink Market 採混合式架構——鏈下 RFQ 定價、鏈上結算:

  1. 使用者向以 Go 撰寫的 PMM 伺服器請求報價。
  2. PMM 定價引擎以基點計算價格。
  3. 伺服器配置序號與到期時間。
  4. 報價編碼後以 Ed25519 金鑰簽署。
  5. 使用者將報價與付款提交至 Sui 智慧合約。
  6. 合約驗證簽章、效期、PMM 身分與序號。
  7. 使用者與 PMM 的抵押品一併匯入市場資金池。
  8. 系統鑄造一個 Sui Position 物件給使用者。
  9. 市場裁決後,勝方部位可在鏈上贖回。

智慧合約以 Move 2024 撰寫,拆成市場管理、RFQ 執行、抵押品記帳、費用計算、管理與事件等模組。PMM 伺服器以 Go 撰寫,透過 /v1/quote API 處理報價產生、簽署、序號持久化、流量限制與報價封存。

關於設計,有幾點我想特別提出來:

  • 每筆交易只需要覆蓋該筆支付所需的抵押品,而不是把資金鎖在共用池裡。
  • 每次成功交易都會鑄造一個可轉移、由錢包持有的 Sui Position 物件,所有權與贖回權因此都在鏈上、可驗證。
  • 報價以密碼學方式綁定市場、方向、數量、價格、PMM、序號與到期時間;PMM 公鑰也以密碼學方式綁定其 Sui 位址,到期時間戳避免過期報價被執行,嚴格遞增的序號則避免重放。
  • Go 伺服器重現合約精確的 97 位元組簽名訊息格式,並以黃金測試向量驗證,讓鏈下與鏈上兩側保持一致。
  • 抵押品移轉與部位建立是原子的——同時成功或同時失敗——而智慧合約強制的足額抵押保證每個勝方部位都能依其名目價值贖回。
  • 簽署後的報價會被封存以利查核,但封存失敗不會阻塞報價傳遞。

接下來

PMM 伺服器目前以可設定的參考價格為市場定價,但它採用可插拔的定價架構——保留了介面,之後可以換上市場驅動的定價引擎。