Status: functionSPACE enters testnet shortly. Current markets are simulated, for demonstration and research.

Introduction

What is functionSPACE?

Two things at once: a new market mechanism, and the developer SDK that ships it.

01
A market mechanism — payoff markets

Instead of trading a fixed instrument, you design a payoff function over an outcome, and one shared market prices it. The concept →

02
A developer SDK

One package to embed that mechanism inside any product — a trading app, a dashboard, an agent — without running a venue, hosting liquidity, or operating a resolver. What you can build →

You bring the product; the protocol brings the market.


The concept

Positions are payoff functions

Every tradeable position is, underneath, a payoff function — a mapping from what happens to what you are paid. Today you can't choose that function directly; you pick a pre-baked instrument and inherit its shape. functionSPACE makes the shape itself the thing you design.

Every instrument is one shape

Take one market — say NVIDIA's Data Center revenue for a quarter, which will settle somewhere between $60B and $120B. A payoff function f(x) maps each possible outcome x to a payout. Draw it as a single step and you've built a yes/no prediction market. Draw it flat-then-rising and you've built a call option. Same market, same range — different shape.

Each instrument you already know is just one frozen shape in the space of every shape you could draw — here, one curve changing between the two.

The products you already use are shapes

This isn't only true of raw instruments — it holds for the finished products people trade every day. A prediction market, a range market, a directional trade: each is a familiar interface sitting on a single payoff shape. On the right is the product; on the left is the shape it actually is.

functionSPACE turns the menu around. Rather than choosing from a fixed set of preset shapes, you specify the shape you want — any non-negative curve over the outcome range — and one market prices it directly. The three products above become three of the infinitely many you could build.

Payoff, not belief

Prediction markets are often framed as “submit your belief.” Here the object you trade is the payoff, not a belief: you choose a shape and how much to put behind it, and you collect what that shape pays at the outcome. The market-implied probabilities still exist — but as a read-out of the market, never the thing you hand in. How the market works →


The mechanism

How the market works

One shared market prices any shape you draw. You pay a premium now, and collect what your shape pays at the outcome — with no order book and no counterparty to find.

Underneath every market is a single cost-function market maker that holds the whole outcome range in one liquidity pool. Pricing a shape is a sum of marginal costs across that range — so there is no order book, and no separate liquidity to bootstrap for each strike or bucket. One pool backs every shape anyone draws on that market.

You pay a premium up front, fixed at the moment you trade. At resolution, your position pays out f(x) at the realized outcome. Because the cost function charges more for shapes the market already thinks are likely, contrarian shapes cost less and pay more — the payout on a region is the premium divided by how probable the market holds it to be.

The blue step is one shape (here, “beats $90B”). The dashed curve is the market's implied distribution — a shape's price is set by how much probability sits under it, so contrarian shapes cost less and pay more. Toggle Market prices to hide it.

What the protocol guarantees

01
Max loss is the premium

You buy a claim — you never post margin and can't be liquidated. The most you can lose is what you paid.

02
Payoffs are non-negative

You buy shapes; you don't write them. Betting “against” something is just buying the opposite shape.

03
The outcome range is bounded

Every market is defined over a fixed interval [L, U] — here, $60B to $120B — and settles to a value inside it.

04
Exit any time

Before resolution you can sell your position back to the market at its current mark-to-market value.

Read the market's prices across the whole range and you recover its implied probability distribution — a by-product of the payoff mechanism, and a richer signal than a single yes/no price. It is a read-out of the market, never the thing you trade.


Build

What you can build

Because every instrument is one shape over one market, a lot of different-looking products are the same integration underneath. The primitive is domain-agnostic — the real question is where you think a payoff belongs.

Prediction & sports markets

Yes/no calls and where-will-it-land markets on anything with a number attached — elections, earnings, scores, weather.

Structured & directional products

Calls, spreads, ranges, butterflies, fully custom payoffs — an options desk expressed as a handful of shapes.

Research & analytics

Dashboards over market-implied distributions: mean, variance, tail risk, calibration — the crowd's full view, not just a price.

AI agents

Bots that read public data and take calibrated positions autonomously, sizing conviction into the shape they buy.

Media & embeds

Drop a live market into a newsletter, forum, stream, or chat — a tradeable take next to the story.

DeFi integrations

Market-implied distributions as oracle feeds, and structured products built on top of the payoff primitive.


Build

How to build it

Install one package, then choose how deep you go. The protocol owns the market; you own the product around it.

The SDK is live today. Install one package, read a market's state, build a shape over its outcome range, and preview what it pays across every outcome before you commit.

npm install @functionspace/core import { FSClient, queryMarketState, generateRange, previewPayoutCurve } from '@functionspace/core' const client = new FSClient({ baseUrl: 'https://fs-engine-api.onrender.com' }) const market = await queryMarketState(client, 1) const { K, L, H } = market.config // buckets + outcome range // a shape over the range, then what it pays across outcomes const shape = generateRange(90, 105, K, L, H, 0.5) const curve = await previewPayoutCurve(client, 1, shape, 100)

Three integration depths

Fastest
@functionspace/ui

Pre-built React widgets — charts, trade panels, position tables. Pick a theme, ship.

Flexible
@functionspace/react

A provider and hooks that wrap the core functions — render whatever UI you want on top.

Full control
@functionspace/core

Pure, framework-agnostic TypeScript — the API client and math. Works in Node, the browser, or an agent.

Your users only ever see your UI — the SDK handles market state, pricing, and trades underneath. Full reference, and the LLM-ready docs for agents, at docs.functionspace.dev.


Reference

FAQ

Common questions about the demo and the mechanism.

Demo & status

No. Today's markets are simulated, play-money demos, seeded so they feel live. The mechanics are real; the collateral and outcomes are not. Build as if it were real — because the mechanism is.

Market creation isn't yet exposed in the SDK. If your build needs a specific set of markets, reach out and we'll spin them up for you.

The mechanism

The premium paid, and no more. Positions are bought claims — there's no margin and no liquidation, so a position can never owe more than it cost.

You buy the opposite shape. Payoffs are non-negative — instead of shorting, you buy a shape that pays where you think the outcome will land (or won't).

A single cost-function market maker holds one liquidity pool across the whole outcome range, so every shape shares the same liquidity — no per-strike order books. The pool is seeded when the market is created and deepens as it's used; contrarian shapes are the cheapest to buy.

Moving the price costs more the further you push it, and a buy-then-sell round trip always costs more than it returns — so splitting, reordering, or cycling trades never pays. The market gets harder to shift as it deepens.

Yes. A position can be exited any time at its current mark-to-market value. If the market moved toward your shape you exit for more than you paid; if it moved away, for less.

Building

No. The SDK turns simple inputs — a slider, a yes/no toggle, a range selector — into a payoff shape under the hood. Users only ever see your UI.

Your call. The SDK supports gas abstraction — sponsored or relayed — so you can ship an experience that feels fully Web2: email login, no wallet UI. Power users can still connect their own wallet if you want to support it.

Yes. The SDK supports developer fees on trades — you keep what you collect. (Fees aren't enforced in the play-money demo.)

functionSPACE is designed to be multi-chain; the production deployment target will be confirmed ahead of mainnet. The demo runs on simulated infrastructure, so chain choice doesn't affect what you build.


Navigation

Where to go next

Pick the path that matches what you came here to do.