Polymarket

Complete guide to trading on Polymarket through MoltMarket.


Overview

Polymarket is a decentralized prediction market platform built on Polygon. Markets are settled on-chain using UMA's optimistic oracle, with USDC as collateral.

Key Features:

  • Zero trading fees

  • High liquidity ($1M-$20M major markets)

  • On-chain settlement

  • Global access (no KYC)

  • Continuous trading 24/7


Getting Started

1. Create Polygon Wallet

# Generate new wallet
moltmarket wallet create --network polygon

# Or import existing
moltmarket wallet import \
  --private-key-path ~/.ethereum/polygon.key \
  --network polygon

2. Fund Wallet with USDC

Bridge from Ethereum:

  1. Connect Ethereum wallet

  2. Bridge USDC to Polygon

  3. Wait ~10 minutes for confirmation

Buy USDC on Polygon:

  1. Swap MATIC → USDC

  2. Or deposit directly via Coinbase/Kraken

3. Configure MoltMarket


API Architecture

Three API Endpoints

Gamma API (https://gamma-api.polymarket.com)

  • Markets, events, search

  • Public data (no auth required)

  • Used by: market.search, market.get_data

Data API (https://data-api.polymarket.com)

  • User positions, trades, analytics

  • Public data (no auth required)

  • Used by: portfolio.get_positions

CLOB API (https://clob.polymarket.com)

  • Order placement, cancellation

  • Requires API key authentication

  • Used by: position.open, position.close


Trading Flow

1. Approve USDC Spending (One-Time)

2. Place Order

Behind the scenes:

  1. Fetch market data from Gamma API

  2. Calculate shares: shares = amount / price

  3. Sign order with private key

  4. Submit to CLOB API

  5. Order matched on-chain

  6. Shares minted via CTF contract

3. Monitor Position

Data sources:

  • Current price: Gamma API

  • Position shares: Data API

  • P&L calculation: Client-side

4. Close Position

Settlement:

  • Order placed on CLOB

  • Shares sold on-chain

  • USDC returned to wallet


Smart Contracts

Key Contracts (Polygon Mainnet)

CTF Contract (Conditional Token Framework)

  • Address: 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045

  • Purpose: Mint/burn outcome shares

  • Used for: All position management

USDC Contract

  • Address: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174

  • Purpose: Collateral for positions

Gas Fees

Typical gas costs (March 2026):

  • Order placement: $0.50-2.50

  • Position close: $0.50-2.50

  • USDC approval: $1.00-3.00 (one-time)

Gas optimization:


Market Resolution

Resolution Process

  1. Event Occurs - Real-world outcome determined

  2. Oracle Proposes - UMA oracle proposes outcome

  3. Challenge Period - 2-hour dispute window

  4. Settlement - Winning shares → USDC (1:1)

Claiming Winnings


Rate Limits

Public APIs (Gamma, Data):

  • No rate limits

  • Unlimited requests

CLOB API (Trading):

  • No explicit limits

  • Best practice: <10 req/sec

Blockchain RPC:

  • Depends on provider

  • Public RPCs: ~100 req/sec

  • Infura/Alchemy: 500-1000 req/sec


Best Practices

1. Monitor Gas Prices

2. Use Limit Orders for Large Trades

3. Check Orderbook Liquidity


Troubleshooting

Issue: Transaction Fails

Cause: Insufficient USDC or MATIC for gas

Solution:

Issue: "Slippage Exceeded"

Cause: Price moved between order submission and execution

Solution:

Issue: USDC Approval Fails

Cause: Previous approval exists

Solution:


Resources


Last updated