docs: sync with official Polymarket docs - 2026-04-20
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
|
||||
# Merge Tokens
|
||||
|
||||
> Convert outcome token pairs back to USDC.e
|
||||
> Convert outcome token pairs back to pUSD
|
||||
|
||||
**Merging** is the inverse of splitting — it converts a full set of outcome tokens back into USDC.e collateral. For every 1 Yes token and 1 No token you merge, you receive \$1 USDC.e. The condition must already be prepared on the CTF contract (via `prepareCondition`).
|
||||
**Merging** is the inverse of splitting — it converts a full set of outcome tokens back into pUSD collateral. For every 1 Yes token and 1 No token you merge, you receive \$1 pUSD. The condition must already be prepared on the CTF contract (via `prepareCondition`).
|
||||
|
||||
```
|
||||
100 Yes tokens + 100 No tokens → $100 USDC.e
|
||||
100 Yes tokens + 100 No tokens → $100 pUSD
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
@@ -24,14 +24,14 @@ Before merging, you need:
|
||||
|
||||
1. You call `mergePositions()` with the amount and market details
|
||||
2. One unit of each position in a full set is burned in return for 1 collateral unit
|
||||
3. The CTF contract releases USDC.e back to your wallet
|
||||
3. The CTF contract releases pUSD back to your wallet
|
||||
|
||||
The operation is atomic — if you don't have enough of both tokens, the transaction reverts.
|
||||
|
||||
## Function Parameters
|
||||
|
||||
<ResponseField name="collateralToken" type="IERC20">
|
||||
USDC.e (Bridged USDC) contract address: `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174`
|
||||
pUSD (Polymarket USD) contract address: `0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB`
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="parentCollectionId" type="bytes32">
|
||||
@@ -54,7 +54,7 @@ The operation is atomic — if you don't have enough of both tokens, the transac
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Redeem Tokens" icon="hand-holding-dollar" href="/trading/ctf/redeem">
|
||||
Exchange winning tokens for USDC.e after resolution
|
||||
Exchange winning tokens for pUSD after resolution
|
||||
</Card>
|
||||
|
||||
<Card title="CTF Overview" icon="book" href="/trading/ctf/overview">
|
||||
|
||||
@@ -12,12 +12,12 @@ All outcomes on Polymarket are tokenized using the **Conditional Token Framework
|
||||
|
||||
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 |
|
||||
| Token | Redeems for | Condition |
|
||||
| ------- | ----------- | -------------------- |
|
||||
| **Yes** | \$1.00 pUSD | Event occurs |
|
||||
| **No** | \$1.00 pUSD | Event 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.
|
||||
These tokens are always **fully collateralized** — every Yes/No pair is backed by exactly \$1.00 pUSD locked in the CTF contract.
|
||||
|
||||
## Core Operations
|
||||
|
||||
@@ -25,15 +25,15 @@ CTF provides three fundamental operations:
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Split" icon="scissors" href="/trading/ctf/split">
|
||||
Convert USDC.e into Yes + No token pairs
|
||||
Convert pUSD into Yes + No token pairs
|
||||
</Card>
|
||||
|
||||
<Card title="Merge" icon="merge" href="/trading/ctf/merge">
|
||||
Convert Yes + No pairs back to USDC.e
|
||||
Convert Yes + No pairs back to pUSD
|
||||
</Card>
|
||||
|
||||
<Card title="Redeem" icon="hand-holding-dollar" href="/trading/ctf/redeem">
|
||||
Exchange winning tokens for USDC.e after resolution
|
||||
Exchange winning tokens for pUSD after resolution
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
@@ -83,7 +83,7 @@ getPositionId(collateralToken, collectionId)
|
||||
|
||||
| Parameter | Type | Value |
|
||||
| ----------------- | --------- | ----------------------------------------- |
|
||||
| `collateralToken` | `IERC20` | USDC.e contract address on Polygon |
|
||||
| `collateralToken` | `IERC20` | pUSD contract address on Polygon |
|
||||
| `collectionId` | `bytes32` | One 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.
|
||||
@@ -109,7 +109,7 @@ For neg risk markets, an additional **conversion** operation allows exchanging a
|
||||
|
||||
## Contract Addresses
|
||||
|
||||
See [Contract Addresses](/resources/contract-addresses) for all Polymarket smart contract addresses on Polygon.
|
||||
See [Contracts](/resources/contracts) for all Polymarket smart contract addresses on Polygon.
|
||||
|
||||
## Resources
|
||||
|
||||
@@ -127,11 +127,11 @@ See [Contract Addresses](/resources/contract-addresses) for all Polymarket smart
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Split Tokens" icon="scissors" href="/trading/ctf/split">
|
||||
Create outcome token pairs from USDC.e
|
||||
Create outcome token pairs from pUSD
|
||||
</Card>
|
||||
|
||||
<Card title="Merge Tokens" icon="merge" href="/trading/ctf/merge">
|
||||
Convert token pairs back to USDC.e
|
||||
Convert token pairs back to pUSD
|
||||
</Card>
|
||||
|
||||
<Card title="Redeem Tokens" icon="hand-holding-dollar" href="/trading/ctf/redeem">
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
# Redeem Tokens
|
||||
|
||||
> Exchange winning tokens for USDC.e after market resolution
|
||||
> Exchange winning tokens for pUSD after market resolution
|
||||
|
||||
**Redeeming** converts winning outcome tokens into USDC.e after a market resolves. Each winning token is worth exactly $1.00 — the losing token is worth $0.
|
||||
**Redeeming** converts winning outcome tokens into pUSD after a market resolves. Each winning token is worth exactly $1.00 — the losing token is worth $0.
|
||||
|
||||
```
|
||||
Market resolves YES:
|
||||
100 Yes tokens → $100 USDC.e
|
||||
100 Yes tokens → $100 pUSD
|
||||
100 No tokens → $0
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ Market resolves YES:
|
||||
|
||||
Redemption is only available **after a market resolves**. Once the oracle reports the outcome:
|
||||
|
||||
* **Winning tokens** can be redeemed for \$1.00 USDC.e each
|
||||
* **Winning tokens** can be redeemed for \$1.00 pUSD each
|
||||
* **Losing tokens** are worth \$0 and produce no payout
|
||||
|
||||
<Note>
|
||||
@@ -44,7 +44,7 @@ Before redeeming:
|
||||
## Function Parameters
|
||||
|
||||
<ResponseField name="collateralToken" type="IERC20">
|
||||
USDC.e (Bridged USDC) contract address: `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174`
|
||||
pUSD (Polymarket USD) contract address: `0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB`
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="parentCollectionId" type="bytes32">
|
||||
@@ -78,7 +78,7 @@ When you call `redeemPositions()`:
|
||||
|
||||
* Your token balance is multiplied by the payout
|
||||
* Winning tokens are burned
|
||||
* USDC.e is transferred to your wallet
|
||||
* pUSD is transferred to your wallet
|
||||
* Losing tokens are burned as well, but produce a \$0 payout
|
||||
|
||||
## Next Steps
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
# Split Tokens
|
||||
|
||||
> Convert USDC.e into outcome token pairs
|
||||
> Convert pUSD into outcome token pairs
|
||||
|
||||
**Splitting** converts USDC.e collateral into a full (position) set of outcome tokens. For every \$1 USDC.e you split, you receive 1 Yes token and 1 No token.
|
||||
**Splitting** converts pUSD collateral into a full (position) set of outcome tokens. For every \$1 pUSD you split, you receive 1 Yes token and 1 No token.
|
||||
|
||||
```
|
||||
$100 USDC.e → 100 Yes tokens + 100 No tokens
|
||||
$100 pUSD → 100 Yes tokens + 100 No tokens
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before splitting, ensure you have:
|
||||
|
||||
1. **USDC.e balance** on Polygon
|
||||
2. **USDC.e approval** for the CTF contract to spend your tokens
|
||||
1. **pUSD balance** on Polygon
|
||||
2. **pUSD approval** for the CTF contract to spend your tokens
|
||||
3. **Condition ID** of the market — the condition must already be prepared on the CTF contract (via `prepareCondition`)
|
||||
|
||||
<Note>
|
||||
@@ -27,16 +27,16 @@ Before splitting, ensure you have:
|
||||
|
||||
## How It Works
|
||||
|
||||
1. You approve the CTF contract to spend your USDC.e
|
||||
1. You approve the CTF contract to spend your pUSD
|
||||
2. You call `splitPosition()` with the amount and market details
|
||||
3. The CTF contract transfers USDC.e from your wallet and mints both outcome tokens
|
||||
3. The CTF contract transfers pUSD from your wallet and mints both outcome tokens
|
||||
|
||||
The operation is atomic — if any step fails, the entire transaction reverts.
|
||||
|
||||
## Function Parameters
|
||||
|
||||
<ResponseField name="collateralToken" type="IERC20">
|
||||
USDC.e (Bridged USDC) contract address: `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174`
|
||||
pUSD (Polymarket USD) contract address: `0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB`
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="parentCollectionId" type="bytes32">
|
||||
@@ -60,7 +60,7 @@ The operation is atomic — if any step fails, the entire transaction reverts.
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Merge Tokens" icon="merge" href="/trading/ctf/merge">
|
||||
Convert token pairs back to USDC.e
|
||||
Convert token pairs back to pUSD
|
||||
</Card>
|
||||
|
||||
<Card title="Trade on Orderbook" icon="chart-line" href="/trading/orders/create">
|
||||
|
||||
Reference in New Issue
Block a user