TIP — Improvement Proposal
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:
| Type | What trades | Settled in | Position? |
|---|---|---|---|
| Spot | base asset vs. quote asset | balance swap | no — balances only |
| Perps | perpetual contract | mark-to-market + funding | yes |
| Outcome | prediction-market shares | redeemed to margin at 0/1 | yes (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
- 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.
- 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.
- 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.
- 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
| Concern | Spot | Perps | Outcome |
|---|---|---|---|
| Position tracking | none | yes | yes (YES / NO share legs) |
| Funding | n/a | yes (default 1h cycle) | n/a |
| Leverage / margin | n/a | tiered margin (cross or isolated) | isolated margin only |
| Settlement trigger | on fill | continuous mark-to-market | market resolution |
| Contract / share style | — | linear or inverse, set per market | complementary YES + NO shares |
| Special operations | — | reduce-only, TP/SL, TWAP | split / 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.