docs: sync Polymarket documentation (2026-05-03)

Updated 55 files with latest documentation changes
This commit is contained in:
Etherdrake
2026-05-03 14:55:37 +02:00
parent 3695c0249e
commit a54a713360
58 changed files with 799 additions and 637 deletions
+10 -2
View File
@@ -20,11 +20,19 @@ Before merging, you need:
2. **Condition ID** of the market
3. **Sufficient gas** for the transaction
<Note>
Polymarket uses thin collateral adapter contracts for pUSD-native CTF actions.
Approve the adapter once, then route split, merge, and redeem actions through
it. For merge flows, the adapter calls the underlying CTF contract, receives
the released USDC.e collateral, wraps it into pUSD, and returns pUSD to your
wallet automatically.
</Note>
## How It Works
1. You call `mergePositions()` with the amount and market details
1. You call the adapter's merge flow 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 pUSD back to your wallet
3. The adapter converts the released collateral into pUSD and returns pUSD to your wallet
The operation is atomic — if you don't have enough of both tokens, the transaction reverts.
+10 -2
View File
@@ -41,6 +41,14 @@ Before redeeming:
2. **Hold winning tokens** — only the winning outcome can be redeemed
3. **Know the condition ID** — required for the redemption call
<Note>
Polymarket uses thin collateral adapter contracts for pUSD-native CTF actions.
Approve the adapter once, then route split, merge, and redeem actions through
it. On redeem, the adapter burns the ERC1155 outcome tokens through the CTF
contract, receives USDC.e collateral, wraps it into pUSD, and returns pUSD to
your wallet automatically.
</Note>
## Function Parameters
<ResponseField name="collateralToken" type="IERC20">
@@ -74,11 +82,11 @@ The CTF uses a **payout vector** to determine redemption values:
| Yes wins | `[1, 0]` | Yes = $1, No = $0 |
| No wins | `[0, 1]` | Yes = $0, No = $1 |
When you call `redeemPositions()`:
When you redeem through the adapter:
* Your token balance is multiplied by the payout
* Winning tokens are burned
* pUSD is transferred to your wallet
* The released collateral is wrapped into pUSD and transferred to your wallet
* Losing tokens are burned as well, but produce a \$0 payout
## Next Steps
+11 -4
View File
@@ -17,9 +17,16 @@ $100 pUSD → 100 Yes tokens + 100 No tokens
Before splitting, ensure you have:
1. **pUSD balance** on Polygon
2. **pUSD approval** for the CTF contract to spend your tokens
2. **pUSD approval** for the CTF collateral adapter to spend your tokens
3. **Condition ID** of the market — the condition must already be prepared on the CTF contract (via `prepareCondition`)
<Note>
Polymarket uses thin collateral adapter contracts for pUSD-native CTF actions.
Approve the adapter once, then route split, merge, and redeem actions through
it. The adapter handles the CTF collateral plumbing so user-facing flows stay
in pUSD.
</Note>
<Note>
If the partition is trivial, invalid, or refers to more slots than the
condition is prepared with, the transaction will revert.
@@ -27,9 +34,9 @@ Before splitting, ensure you have:
## How It Works
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 pUSD from your wallet and mints both outcome tokens
1. You approve the CTF collateral adapter to spend your pUSD
2. You call the adapter's split flow with the amount and market details
3. The adapter calls the underlying CTF contract and mints both outcome tokens
The operation is atomic — if any step fails, the entire transaction reverts.