What is CTF
The Conditional Token Framework creates ERC1155 tokens representing outcomes of prediction markets. Each binary market has two tokens:| Token | Redeems for | Condition |
|---|---|---|
| Yes | $1.00 USDC.e | Event occurs |
| No | $1.00 USDC.e | Event does not occur |
Core Operations
CTF provides three fundamental operations:Split
Convert USDC.e into Yes + No token pairs
Merge
Convert Yes + No pairs back to USDC.e
Redeem
Exchange winning tokens for USDC.e after resolution
Token Flow

Token Identifiers
Each outcome token has a unique position ID (also called token ID or asset ID), computed onchain in three steps.Step 1 - Condition ID
| Parameter | Type | Value |
|---|---|---|
oracle | address | UMA CTF Adapter |
questionId | bytes32 | Hash of the UMA ancillary data |
outcomeSlotCount | uint | 2 for all binary markets |
Step 2 - Collection IDs
| Parameter | Type | Value |
|---|---|---|
parentCollectionId | bytes32 | bytes32(0) — always zero for top-level positions |
conditionId | bytes32 | The condition ID from step 1 |
indexSet | uint | 1 (0b01) for the first outcome, 2 (0b10) for the second |
indexSet is a bitmask denoting which outcome slots belong to a collection. It must be a nonempty proper subset of the condition’s outcome slots. Binary markets always have exactly two collections — one per outcome.
Step 3 - Position IDs
| Parameter | Type | Value |
|---|---|---|
collateralToken | IERC20 | USDC.e contract address on Polygon |
collectionId | bytes32 | One of the two collection IDs from step 2 |
You can look up token IDs directly via the Gamma API (
GET /markets or GET /events
— the tokens array on each market contains both outcome token IDs). Computing them
manually is only necessary for direct smart contract integration.Standard vs Neg Risk Markets
Polymarket has two market types with different CTF configurations:| Feature | Standard Markets | Neg Risk Markets |
|---|---|---|
| CTF Contract | ConditionalTokens | ConditionalTokens |
| Exchange Contract | CTF Exchange | Neg Risk CTF Exchange |
| Multi-outcome | Independent markets | Linked via conversion |
negRisk flag | false | true |
Contract Addresses
See Contract Addresses for all Polymarket smart contract addresses on Polygon.Resources
CTF Source Code
Gnosis Conditional Tokens smart contracts
Code Examples
Python and TypeScript examples for onchain operations
