prepareCondition).
Prerequisites
Before merging, you need:- Equal amounts of both Yes and No tokens
- Condition ID of the market
- Sufficient gas for the transaction
How It Works
- You call
mergePositions()with the amount and market details - One unit of each position in a full set is burned in return for 1 collateral unit
- The CTF contract releases pUSD back to your wallet
Function Parameters
pUSD (Polymarket USD) contract address:
0xC011a7E12a19f7B1f670d46F03B03f3342E82DFBAlways
0x0000...0000 (32 zero bytes) for Polymarket marketsThe market’s condition ID, available from the Markets API
Array of index sets:
[1, 2] for binary marketsThe number of full sets to merge. Also the amount of collateral to receive.
Next Steps
Redeem Tokens
Exchange winning tokens for pUSD after resolution
CTF Overview
Learn more about the Conditional Token Framework