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.
Outcome Tokens
Section titled “Outcome Tokens”Each market produces exactly two outcome tokens:
| Token | Redeems For | Condition |
|---|---|---|
| Yes | $1.00 USDC.e | The event occurs |
| No | $1.00 USDC.e | The 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.
Token Operations
Section titled “Token Operations”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 tokensCommon 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:
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.eMerging 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
curl -X POST "https://api.openfish.fun/ctf/merge" \ -H "Content-Type: application/json" \ -d '{"condition_id": "0xabc...", "amount": "100000000"}'Redeem
Section titled “Redeem”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.
| Outcome | Yes Tokens | No Tokens |
|---|---|---|
| Event occurs | Worth $1.00 each | Worth $0.00 |
| Event does not occur | Worth $0.00 | Worth $1.00 each |
100 winning tokens --> $100 USDC.ecurl -X POST "https://api.openfish.fun/ctf/redeem" \ -H "Content-Type: application/json" \ -d '{"condition_id": "0xabc..."}'Positions
Section titled “Positions”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
Section titled “Position Value”Position value = Token balance x Current priceFor instance, if you hold 100 Yes tokens and Yes is trading at $0.75:
Position value = 100 x $0.75 = $75.00Querying Positions
Section titled “Querying Positions”Check your balance and allowance for a given token:
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.
Profit and Loss
Section titled “Profit and Loss”Your profit or loss hinges on how the resolution outcome compares to your entry price.
Example: Buying Yes at $0.40
Section titled “Example: Buying Yes at $0.40”| Scenario | Outcome | Return Per Token | Profit Per Token |
|---|---|---|---|
| Event occurs | Yes wins | $1.00 | +$0.60 (150% return) |
| Event does not occur | No wins | $0.00 | -$0.40 (total loss) |
Example: Selling Before Resolution
Section titled “Example: Selling Before Resolution”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.
Neg-Risk Markets
Section titled “Neg-Risk Markets”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
Example: Multi-Outcome Event
Section titled “Example: Multi-Outcome Event”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.00If 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
Contract Addresses (Polygon Mainnet)
Section titled “Contract Addresses (Polygon Mainnet)”| Contract | Address | Purpose |
|---|---|---|
| Conditional Tokens (CTF) | 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045 | ERC1155 token contract; holds all outcome tokens |
| USDC.e (Collateral) | 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | Bridged USDC used as collateral |
| Exchange | 0xA642f9165D192Ff13b1D43a0Ef56B3BD074614bB | Standard market trading |
| Neg Risk Exchange | 0x700eaF3f3FEb1D3f2aE67000e1A4FA41a6E35DF1 | Multi-outcome market trading |
| Neg Risk Adapter | 0x0d8FA66CFe5D5EF96D6be9C4e808BD4279527d6e | Adapter for neg-risk token operations |
Testnet (Amoy)
Section titled “Testnet (Amoy)”For development and testing, Openfish maintains a deployment on the Polygon Amoy testnet (chain ID 80002):
| Contract | Address |
|---|---|
| Exchange | 0xdFE02Eb6733538f8Ea35D585af8DE5958AD99E40 |
| Collateral | 0x9c4e1703476e875070ee25b56a58b008cfb8fa78 |
| Conditional Tokens | 0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB |
Proxy wallet deployment is not available on the Amoy testnet. Use EOA (type 0) or Gnosis Safe (type 2) for testing.
Next Steps
Section titled “Next Steps”- Resolution — How markets are resolved and winning tokens redeemed
- Markets & Events — Understand market structure and identifiers