redeemer — On-chain position redeemer

Claims resolved Polymarket positions on-chain via the Safe relayer. Supports standard CTF and neg-risk adapter. Dry-run by default, --live to execute, batches of 20. Free in every bundle.

Version v1.0.0 · One-time payment · Source code download
Strategy typeUtility
AssetAll
Timeframe
Market typeAll Polymarket markets
Minimum capital$0
Dependencies@polymarket/builder-relayer-client

What it does

redeemer is a one-shot CLI that claims your resolved Polymarket positions on-chain. Run without --live to see the list of what's redeemable. Run with --live to call redeemPositions() on the Conditional Token Framework (and the neg-risk adapter for multi-outcome markets) via Polymarket's Safe relayer.

The edge

Polymarket does not automatically send resolved position payouts to your wallet. Winning shares sit as unclaimed outcome tokens until you call the on-chain redeem function. Doing this manually via a block explorer is painful: you need the conditionId, the indexSets, the right contract for the right market type. redeemer does all of it from one command.

Both standard CTF markets and neg-risk markets (multi-outcome) are handled. The script identifies the market type per position and dispatches to the right contract automatically.

How it works

1. Read secrets.json for the EOA + proxy wallet 2. GET data-api.polymarket.com/positions?user={proxy} 3. Filter to positions where the market is closed AND outcome >= $0.99 (winners) 4. For each: - Standard CTF market → CTF.redeemPositions(collateral, parent, conditionId, indexSets) - Neg-risk market → NegRiskAdapter.redeemPositions(conditionId, amounts) 5. Batch into groups of --batch (default 20) per relayer transaction 6. Submit via @polymarket/builder-relayer-client → wait for STATE_MINED

Contract addresses (Polygon mainnet):

CTF 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045 NegRiskAdapter 0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296 USDC.e 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174

The relayer pays gas. Your wallet only needs the signed authorization.

Sample output

[24/05/2026, 08:00:01] Polymarket Position Redeemer EOA: 0xAbCd... Proxy: 0x1234... Mode: DRY-RUN

Fetching redeemable positions... Found 14 redeemable positions:

  1. [CTF] "Will SCOTUS rule by July?" Yes 47 shares × $1.00 = $47.00
  2. [CTF] "BTC above $110k on May 24?" No 25 shares × $1.00 = $25.00
  3. [NegRisk] "2026 Best Picture winner" Z 12 shares × $1.00 = $12.00 ...

Total redeemable: $234.50 across 14 positions

--- DRY-RUN: pass --live to execute redemptions ---

Design targets

The script is deterministic. Given the same wallet and the same Data API response, it always emits the same set of redemption calls. There is no win rate or PnL to target.

What's guaranteed:

  • Dry-run shows you exactly what --live will do, no surprises
  • Batches of 20 by default (configurable) to stay under the relayer's per-tx limit
  • Handles both standard CTF and neg-risk markets automatically
  • Will not attempt to redeem unresolved positions (price < $0.99) or already-claimed ones

FAQ

When should I run this vs redeem-auto / redeem-convert-auto?

Run this manually if you trade infrequently (a couple of times a week). Run redeem-auto or redeem-convert-auto if you have any high-churn scalper running continuously, since manual redemption can't keep up with their throughput.

Does it cost gas?

No. Polymarket's builder relayer sponsors the gas. You only sign the authorization off-chain.

What about USDC.e vs pUSD?

Standard CTF redemptions still pay out in USDC.e. If your bots trade against pUSD (CLOB v2), you need the wrap step too. That's what redeem-convert-auto adds on top.

What's included

  • tools/redeem.js
  • README with neg-risk vs CTF explanation, batch sizing, and a worked dry-run example

Configuration

FlagDefaultDescription
--liveExecute redemptions on-chain. Default is dry-run (list only).
--batch 2020Number of positions to redeem per transaction batch.

Related bots