Skip to main content
All outcomes on Polymarket are tokenized using the Conditional Token Framework (CTF), an open standard developed by Gnosis. Understanding CTF operations enables advanced trading strategies, market making, and direct smart contract interactions.

What is CTF

The Conditional Token Framework creates ERC1155 tokens representing outcomes of prediction markets. Each binary market has two tokens:
TokenRedeems forCondition
Yes$1.00 USDC.eEvent occurs
No$1.00 USDC.eEvent does not occur
These tokens are always fully collateralized — every Yes/No pair is backed by exactly $1.00 USDC.e locked in the CTF contract.

Core Operations

CTF provides three fundamental operations:

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

getConditionId(oracle, questionId, outcomeSlotCount)
ParameterTypeValue
oracleaddressUMA CTF Adapter
questionIdbytes32Hash of the UMA ancillary data
outcomeSlotCountuint2 for all binary markets

Step 2 - Collection IDs

getCollectionId(parentCollectionId, conditionId, indexSet)
ParameterTypeValue
parentCollectionIdbytes32bytes32(0) — always zero for top-level positions
conditionIdbytes32The condition ID from step 1
indexSetuint1 (0b01) for the first outcome, 2 (0b10) for the second
The 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

getPositionId(collateralToken, collectionId)
ParameterTypeValue
collateralTokenIERC20USDC.e contract address on Polygon
collectionIdbytes32One of the two collection IDs from step 2
The two resulting position IDs are the ERC1155 token IDs for the Yes and No outcomes of the market.
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:
FeatureStandard MarketsNeg Risk Markets
CTF ContractConditionalTokensConditionalTokens
Exchange ContractCTF ExchangeNeg Risk CTF Exchange
Multi-outcomeIndependent marketsLinked via conversion
negRisk flagfalsetrue
For neg risk markets, an additional conversion operation allows exchanging a No token for Yes tokens in all other outcomes. See Negative Risk Markets for details.

Contract Addresses

See Contract Addresses for all Polymarket smart contract addresses on Polygon.

Resources

Next Steps