Logo di Deepbook Predict

Deepbook Predict

Organizzazione
MystenLabs
deepbook-predict

Guides DeepBook Predict integration on Sui: expiry-based prediction markets where every position is a strike range, minting and redeeming positions, market lifecycle and settlement, order ID handling, and the PoolVault/PLP liquidity pool. Use when the user asks about DeepBook Predict, Sui prediction markets, binary, directional, or range positions, strikes and expiry, quoting, settlement or try_settle, market states, PLP shares, the predict vault, quoteCoinType, or code importing `@mysten/deepbook-v3/predict`. For spot trading use the `deepbook-sdk` skill; for margin, `deepbook-margin`; for architecture, `deepbook-overview`.

Panoramica

AutoreMystenLabs
Repositoryskills
Nome della skilldeepbook-predict
Stelle
21
Fork
12
File inclusi
4
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 4 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da MystenLabs su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Deepbook Predict in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/MystenLabs/skills/tree/main/deepbook-predict
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MystenLabs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/deepbook-predict .claude/skills/deepbook-predict
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Deepbook Predict in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Deepbook Predict non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Deepbook Predict non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

DeepBook Predict

Expiry-based prediction markets on Sui. Each market covers one underlying and one expiry timestamp. Predict is not a perpetual market.

If an API or parameter is not shown here or in the reference files, check docs.sui.io and the deepbookv3 repository rather than extrapolating from other prediction protocols.

Quick start

ts
import { DeepBookClient } from '@mysten/deepbook-v3';
import { getConfig } from '@mysten/deepbook-v3/predict';

// Deployment IDs and coin types are per-network. Never hardcode a symbol.
const config = getConfig(network);           // 'testnet' | 'mainnet'
const collateral = config.quoteCoinType;

// `active` means live and NOT YET SETTLED — expired-but-unsettled markets are
// still returned here, and quoting against them aborts.
const markets = await client.predict.read.markets();
const tradable = markets.filter((m) => !m.is_settled);

Task: explain Predict and its position types

  • Every position is a range contract. It pays a fixed amount if the settlement price lands inside the chosen strike range, and nothing otherwise.
  • A directional ("binary") position is a one-sided range. Side up pays when settlement lands above the strike; side down pays when it lands at or below it.
  • Quantity is the maximum payout in USDC, not a share count, and must be a whole lot of 0.01 USDC (10,000 base units at 6 decimals).
  • Liquidity providers supply USDC to a shared pool, receive PLP shares, and take the other side of every trade.

Payoff detail and worked examples: positions-and-oracles.md.

Task: mint a position in TypeScript

Checklist:

  1. getConfig(network) → deployment IDs and quoteCoinType.
  2. client.predict.read.markets() → pick a market that is not settled.
  3. Build the mint call (market, side or strike range, quantity in whole 0.01 USDC lots). Exact argument names: workflow.md.
  4. Execute, then decode the order ID from the transaction result — it exists nowhere else.
  5. Persist { marketId, orderId } together.
  6. Re-read the order ID after any partial close.
ts
const tx = new Transaction();
client.predict.mint(tx, mintArgs); // see workflow.md for mintArgs

const result = await suiClient.signAndExecuteTransaction({
  transaction: tx,
  signer: keypair,
  options: { showEvents: true, showObjectChanges: true },
});

const { orderId } = client.predict.decode.mint(result);
await store.save({ marketId, orderId }); // both, always

Why both IDs: an order ID is unique only inside one market, so redeem and claim need the market ID alongside it. Closing part of a position replaces the order ID with a new one — the old ID no longer resolves.

Task: market states and settlement

  • active means live and not yet settled. It does not mean "not expired".
  • An expired market that nobody has settled is still returned by read.markets(), and quoting against it aborts.
  • Read the lifecycle state from the market — is_settled, or try_settlement_price — instead of comparing the expiry timestamp to the clock.
  • A market becomes settled when someone calls try_settle and it succeeds. The gap between expiry and settlement has no fixed duration.
  • After settlement, positions are claimed/redeemed against the settlement price: full notional if the price landed in range, zero otherwise.
ts
const price = await client.predict.read.try_settlement_price(marketId);
if (!price) {
  // expired or not: still unsettled — do not quote, do not claim
}

State machine detail: positions-and-oracles.md.

Task: vault and PLP liquidity

  • The Predict pool, PoolVault, is the counterparty to every trade.
  • Liquidity providers deposit the pool's collateral coin (USDC) and receive PLP shares — a 6-decimal coin matching USDC's decimals.
  • PLP is a proportional claim on pool value, so its value tracks pool profit and loss rather than paying a fixed yield.
  • Read the exact collateral coin type from getConfig(network).quoteCoinType; do not assume a symbol.
  • Withdrawals require available liquidity after covering maximum payout obligations, and large withdrawals may be throttled.

Supply/withdraw calls: workflow.md.

Task: common mistakes

MistakeDo instead
Assuming the collateral coin symbolRead getConfig(network).quoteCoinType
Inferring settlement from the expiry timestampRead is_settled or try_settlement_price
Quoting an expired market from read.markets()Filter out unsettled-but-expired markets; quoting them aborts
Hardcoding package or object IDsTreat them as pinned to a deployment; read them for the target network
Storing only the order IDStore { marketId, orderId }; order IDs are market-scoped
Reusing an order ID after a partial closeDecode the new order ID from that transaction's result
Quantity that is not a whole 0.01 USDC lotRound to whole lots; quantity is maximum payout
Treating positions as perpetualEvery position expires and is claimed after settlement

Reference files

  • positions-and-oracles.md — payoffs, market lifecycle, settlement mechanics, vault/PLP model.
  • workflow.md — exact call arguments for mint, redeem, claim, LP supply and withdraw.
  • contract-info.md — per-deployment IDs, coin types, server endpoint, event types.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Deepbook Predict?

Guides DeepBook Predict integration on Sui: expiry-based prediction markets where every position is a strike range, minting and redeeming positions, market lifecycle and settlement, order ID handling, and the PoolVault/PLP liquidity pool. Use when the user asks about DeepBook Predict, Sui prediction markets, binary, directional, or range positions, strikes and expiry, quoting, settlement or try_settle, market states, PLP shares, the predict vault, quoteCoinType, or code importing `@mysten/deepbook-v3/predict`. For spot trading use the `deepbook-sdk` skill; for margin, `deepbook-margin`; for...

Perché usare Deepbook Predict su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Deepbook Predict è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Deepbook Predict in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/MystenLabs/skills/tree/main/deepbook-predict. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Deepbook Predict?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Deepbook Predict?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Deepbook Predict: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Deepbook Predict è gratuita?

Sì. È pubblicata su GitHub da MystenLabs con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇