Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

TIP — Improvement Proposal

TIP · INSTRUMENT STANDARD
One config schema, one account model, one order vocabulary — three instrument types.
configspotbalance swapperpsposition · fundingoutcomeYES + NO = 1

The TxFlow Improvement Proposal (TIP) defines the unified instrument standard for TxFlow — the single abstraction under which every tradable market is built.

Under the TIP, spot, perpetual, and outcome markets are all instruments: they share one configuration schema and one account model, and they go through the same clearing and risk framework — differing only where their economics genuinely require it.

This standard is what lets the trading core (TxCore) treat a spot pair, a perpetual contract, and a prediction market as variations of one instrument — and lets integrators learn one model instead of three.

The instrument type

An instrument is one of three types:

TypeWhat tradesSettled inPosition?
Spotbase asset vs. quote assetbalance swapno — balances only
Perpsperpetual contractmark-to-market + fundingyes
Outcomeprediction-market sharesredeemed to margin at 0/1yes (synthetic)

Perps and Outcome share most logic — both maintain positions, margin, and PnL. Spot is the simplest case: a fill is just a swap of balances with no position to track.

What every instrument shares

  1. One config schema — a single instrument config describes every instrument: name, assets, precision, fees, tick sizes, order-size limits, trading-halt flag, and an optional type-specific extension. See Instruments.
  2. One order vocabulary — the same order types and time-in-force names are used across markets, with type-specific restrictions (for example spot rejects GTD and triggers; perps reject GTD; outcome limit orders accept GTC/GTD/ALO). See Matching Engine.
  3. One account model — every user has a spot, perp, and outcome sub-account, with the same three-bucket balance accounting (total / hold / withdrawal hold). Spot has no positions or margin; perps and outcome do. See Key Concepts.
  4. One oracle interface — markets draw mark price, oracle price, funding, and price / open-interest limits from the same oracle structure. See Oracle.

What differs per type

ConcernSpotPerpsOutcome
Position trackingnoneyesyes (YES / NO share legs)
Fundingn/ayes (default 1h cycle)n/a
Leverage / marginn/atiered margin (cross or isolated)isolated margin only
Settlement triggeron fillcontinuous mark-to-marketmarket resolution
Contract / share style—linear or inverse, set per marketcomplementary YES + NO shares
Special operations—reduce-only, TP/SL, TWAPsplit / merge

The pages that follow document the shared config schema first, then the specifics of each type:

  • Instruments — the shared config schema every instrument builds on: name, assets, precision, fees, tick sizes, order-size limits, and the type-specific extension.
  • TIP 1: Spot — direct base-vs-quote trading, settled as a balance swap with no position to track. Unstable.
  • TIP 2: Perpetuals — perpetual contracts with tiered margin, leverage, and funding. Unstable.
  • TIP 3: Outcome Markets — prediction markets trading complementary YES / NO shares that redeem to margin at 0 or 1 on resolution. Unstable.