Skip to content

Positions & Tokens

The foundation of every prediction on Openfish is an outcome token. Trading means buying or selling these tokens, and your position is simply how many tokens you hold for a particular market outcome.


Each market produces exactly two outcome tokens:

TokenRedeems ForCondition
Yes$1.00 USDC.eThe event occurs
No$1.00 USDC.eThe event does not occur

These tokens are ERC1155 assets living on Polygon, implemented through the Gnosis Conditional Token Framework (CTF). Every token carries a unique token_id — a large integer computed from the market’s condition_id combined with the outcome index.

Full collateralization is guaranteed: for every Yes/No token pair in circulation, exactly $1 of USDC.e is locked inside the CTF contract.


Splitting takes USDC.e and converts it into a matched set of outcome tokens. Depositing $1 USDC.e yields 1 Yes token and 1 No token.

$100 USDC.e --> 100 Yes tokens + 100 No tokens

Common reasons to split:

  • Building inventory for market-making strategies (hold both sides, sell each at different times)
  • Acquiring tokens on both sides of a market without routing through the order book

The CLOB server offers a gasless split endpoint:

Terminal window
curl -X POST "https://api.openfish.fun/ctf/split" \
-H "Content-Type: application/json" \
-d '{"condition_id": "0xabc...", "amount": "100000000"}'

Placing buy and sell orders on the order book is the primary way participants enter and exit positions.

  • Buy Yes at $0.60 — Spend $0.60 USDC.e, receive 1 Yes token
  • Sell Yes at $0.60 — Surrender 1 Yes token, receive $0.60 USDC.e

You can adjust your position freely at any time before the market resolves by trading on the CLOB.

Merging is the inverse of splitting — it converts a complete set of outcome tokens back into USDC.e. You need equal quantities of both Yes and No tokens.

100 Yes tokens + 100 No tokens --> $100 USDC.e

Merging is useful when:

  • You want to unwind a hedged position without creating order book impact
  • You have accumulated tokens from market-making activity and want to reclaim the underlying collateral
Terminal window
curl -X POST "https://api.openfish.fun/ctf/merge" \
-H "Content-Type: application/json" \
-d '{"condition_id": "0xabc...", "amount": "100000000"}'

Once a market has resolved, holders of winning tokens can exchange them for USDC.e. The CTF contract burns the tokens and releases the corresponding collateral.

OutcomeYes TokensNo Tokens
Event occursWorth $1.00 eachWorth $0.00
Event does not occurWorth $0.00Worth $1.00 each
100 winning tokens --> $100 USDC.e
Terminal window
curl -X POST "https://api.openfish.fun/ctf/redeem" \
-H "Content-Type: application/json" \
-d '{"condition_id": "0xabc..."}'

A position represents your holdings of a specific outcome token. Openfish maintains a balance_cache that aggregates your token balances across all operations.

Position value = Token balance x Current price

For instance, if you hold 100 Yes tokens and Yes is trading at $0.75:

Position value = 100 x $0.75 = $75.00

Check your balance and allowance for a given token:

Terminal window
curl "https://api.openfish.fun/balance-allowance?asset_type=CONDITIONAL&token_id=YOUR_TOKEN_ID" \
-H "Authorization: ..."

The data server (port 3003) surfaces aggregated position views spanning all markets.


Your profit or loss hinges on how the resolution outcome compares to your entry price.

ScenarioOutcomeReturn Per TokenProfit Per Token
Event occursYes wins$1.00+$0.60 (150% return)
Event does not occurNo wins$0.00-$0.40 (total loss)

You are not obligated to hold until resolution. Selling on the order book lets you realize gains or cap losses early:

  • Bought Yes at $0.40
  • Price climbs to $0.70
  • Sell at $0.70 — profit of $0.30 per token (75% return)

This ability to trade in and out at any time makes Openfish a dynamic trading venue, not merely a place to wager and wait.


In multi-outcome events (neg-risk markets), token mechanics differ slightly. Each individual market within the event still has its own Yes/No tokens, but the outcomes across markets are mutually exclusive.

Key differences for neg-risk markets:

  • Trading routes through a separate Exchange contract (0x700eaF3f3FEb1D3f2aE67000e1A4FA41a6E35DF1)
  • The Neg Risk Adapter (0x0d8FA66CFe5D5EF96D6be9C4e808BD4279527d6e) must be approved for token transfers
  • The aggregate of all Yes prices across the event’s markets should converge toward $1.00
  • At resolution, only one market’s Yes tokens will be redeemable
Event: Who will win the championship?
Market A: Team Alpha? Yes @ $0.45
Market B: Team Beta? Yes @ $0.35
Market C: Team Gamma? Yes @ $0.20
Total: $1.00

If Team Beta wins:

  • Market B Yes tokens redeem for $1.00 each
  • Market A and Market C Yes tokens expire worthless
  • All No tokens resolve in the opposite direction

ContractAddressPurpose
Conditional Tokens (CTF)0x4D97DCd97eC945f40cF65F87097ACe5EA0476045ERC1155 token contract; holds all outcome tokens
USDC.e (Collateral)0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174Bridged USDC used as collateral
Exchange0xA642f9165D192Ff13b1D43a0Ef56B3BD074614bBStandard market trading
Neg Risk Exchange0x700eaF3f3FEb1D3f2aE67000e1A4FA41a6E35DF1Multi-outcome market trading
Neg Risk Adapter0x0d8FA66CFe5D5EF96D6be9C4e808BD4279527d6eAdapter for neg-risk token operations

For development and testing, Openfish maintains a deployment on the Polygon Amoy testnet (chain ID 80002):

ContractAddress
Exchange0xdFE02Eb6733538f8Ea35D585af8DE5958AD99E40
Collateral0x9c4e1703476e875070ee25b56a58b008cfb8fa78
Conditional Tokens0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB

Proxy wallet deployment is not available on the Amoy testnet. Use EOA (type 0) or Gnosis Safe (type 2) for testing.


  • Resolution — How markets are resolved and winning tokens redeemed
  • Markets & Events — Understand market structure and identifiers