Update Polymarket documentation (2026-02-19)
- Added new documentation URLs from llms.txt index - Updated TARGET.md with 244 total documentation pages - Scraped new pages for trading, concepts, and API reference sections - Updated changelog and new index pages
This commit is contained in:
@@ -2,11 +2,93 @@
|
||||
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
|
||||
> Use this file to discover all available pages before exploring further.
|
||||
|
||||
# Reedeeming Tokens
|
||||
# Redeem Tokens
|
||||
|
||||
Once a condition has had it's payouts reported (ie by the UMACTFAdapter calling `reportPayouts` on the CTF contract), users with shares in the winning outcome can redeem them for the underlying collateral. Specifically, users can call the `redeemPositions` function on the CTF contract which will burn all valuable conditional tokens in return for collateral according to the reported payout vector. This function has the following parameters:
|
||||
> Exchange winning tokens for USDC.e after market resolution
|
||||
|
||||
* `collateralToken`: IERC20 - The address of the positions' backing collateral token.
|
||||
* `parentCollectionId`: bytes32 - The ID of the outcome collections common to the position being redeemed. Null in Polymarket case.
|
||||
* `indexSets`: uint\[] - The ID of the condition to redeem.
|
||||
* `indexSets`: uint\[] - An array of disjoint index sets representing a nontrivial partition of the outcome slots of the given condition. E.G. A|B and C but not A|B and B|C (is not disjoint). Each element's a number which, together with the condition, represents the outcome collection. E.G. 0b110 is A|B, 0b010 is B, etc. In the Polymarket case 1|2.
|
||||
**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.
|
||||
|
||||
```
|
||||
Market resolves YES:
|
||||
100 Yes tokens → $100 USDC.e
|
||||
100 No tokens → $0
|
||||
```
|
||||
|
||||
## When to Redeem
|
||||
|
||||
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
|
||||
* **Losing tokens** are worth \$0 and produce no payout
|
||||
|
||||
<Note>
|
||||
You can redeem at any time after resolution — there's no deadline. Your
|
||||
winning tokens will always be redeemable.
|
||||
</Note>
|
||||
|
||||
## How Resolution Works
|
||||
|
||||
1. The market's end condition is met (event occurs, date passes, etc.)
|
||||
2. The UMA Adapter oracle reports the outcome via `reportPayouts()`
|
||||
3. The CTF contract records the payout vector
|
||||
4. Redemption becomes available for winning tokens
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before redeeming:
|
||||
|
||||
1. **Market must be resolved** — check the market's `resolved` status
|
||||
2. **Hold winning tokens** — only the winning outcome can be redeemed
|
||||
3. **Know the condition ID** — required for the redemption call
|
||||
|
||||
## Function Parameters
|
||||
|
||||
<ResponseField name="collateralToken" type="IERC20">
|
||||
USDC.e (Bridged USDC) contract address: `0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174`
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="parentCollectionId" type="bytes32">
|
||||
Always `0x0000...0000` (32 zero bytes) for Polymarket markets
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="conditionId" type="bytes32">
|
||||
The market's condition ID
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="indexSets" type="uint[]">
|
||||
Array of index sets to redeem: `[1, 2]` redeems both outcomes (only winning
|
||||
pays)
|
||||
</ResponseField>
|
||||
|
||||
<Note>
|
||||
Redemption burns your entire token balance for the condition — there is no
|
||||
amount parameter.
|
||||
</Note>
|
||||
|
||||
## Payout Mechanics
|
||||
|
||||
The CTF uses a **payout vector** to determine redemption values:
|
||||
|
||||
| Outcome | Payout Vector | Redemption |
|
||||
| -------- | ------------- | ----------------- |
|
||||
| Yes wins | `[1, 0]` | Yes = $1, No = $0 |
|
||||
| No wins | `[0, 1]` | Yes = $0, No = $1 |
|
||||
|
||||
When you call `redeemPositions()`:
|
||||
|
||||
* Your token balance is multiplied by the payout
|
||||
* Winning tokens are burned
|
||||
* USDC.e is transferred to your wallet
|
||||
* Losing tokens are burned as well, but produce a \$0 payout
|
||||
|
||||
## Next Steps
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="CTF Overview" icon="book" href="/trading/ctf/overview">
|
||||
Learn more about the Conditional Token Framework
|
||||
</Card>
|
||||
|
||||
<Card title="Resolution Process" icon="gavel" href="/concepts/resolution">
|
||||
Understand how markets are resolved
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
Reference in New Issue
Block a user