How does Polymarket work? A technical walkthrough
The full stack behind Polymarket: the order book, the smart contracts, the oracle, USDC settlement, and what happens from your click to final payout.
The user flow from click to payout
Before diving into the technical stack, here's what happens from the user's perspective when you place a trade on Polymarket.
- You see a YES share at 0.42. You click Buy, enter $100, and confirm.
- Polymarket's order-matching engine matches your buy against an existing sell order from another user.
- The match is submitted as a transaction to Polymarket's on-chain exchange contract on Polygon.
- The contract transfers 100 USDC from your wallet and mints 238.1 YES conditional tokens (100 / 0.42) to your wallet.
- A corresponding 238.1 USDC worth of NO tokens goes to the seller's wallet (in the opposite direction).
- Your wallet now holds 238.1 YES shares. You can view them in your Polymarket portfolio or in any Polygon wallet.
- If the market resolves YES, a separate resolve transaction pays 238.1 USDC into your wallet. If NO, the tokens expire worthless.
Every single step except the initial order match happens on-chain, which means it's publicly verifiable and cannot be reversed by Polymarket staff or anyone else.
The three-layer architecture
Layer 1: the CLOB (order book)
Polymarket's order book — called the CLOB, for Central Limit Order Book — is operated as a centralized service by Polymarket. When you place an order, it goes to Polymarket's servers, gets placed in the book, and gets matched against counter-orders in real time.
The centralized order book is a pragmatic compromise. A fully on-chain order book (the Loopring or dYdX approach) would have every order placement, cancellation, and match cost gas, which at Polymarket's volume would be prohibitive. A centralized order book is orders of magnitude faster and cheaper.
The trust assumption is that Polymarket doesn't manipulate the book (front-running, order injection, selective delay). The CLOB is a proprietary service; users trust Polymarket's operational integrity here. In practice, this hasn't been a point of contention — the book is actively monitored by sophisticated traders who would detect sustained manipulation quickly.
Layer 2: on-chain settlement
When two orders match, the trade is submitted to Polymarket's exchange smart contract on Polygon. The contract:
- Accepts the matched order pair signed by both parties
- Transfers USDC from buyer to liquidity reserve (if buying)
- Mints or transfers conditional tokens (ERC-1155 tokens representing YES/NO positions)
- Deducts a minimum fee for oracle security (a fraction of a cent)
- Emits events for external tracking
Every trade is logged on-chain. You can trace any Polymarket trade on Polygonscan, including historical trades, position changes, and payouts.
The exchange contract itself is open-source and has been audited. The conditional token contract is derived from Gnosis's Conditional Tokens Framework, one of the most battle-tested contracts in DeFi.
Layer 3: the oracle
When a market reaches resolution, someone has to declare the outcome. Polymarket uses UMA's optimistic oracle for this.
The mechanic:
- Proposal. Anyone can propose an answer to the question. They post a bond.
- Dispute window. Typically 2 hours. During this time, anyone can dispute the proposed answer by posting an equivalent bond.
- If no dispute: Proposed answer becomes final. Proposer gets their bond back. Payouts execute.
- If disputed: The question escalates to UMA's Data Verification Mechanism. UMA token holders vote. Majority answer wins. Honest voters earn rewards; dishonest voters (by majority) get slashed.
The oracle is "optimistic" because it assumes most proposals will be uncontested. The economics work because proposing a wrong answer is expensive (you lose your bond) and disputing a right answer is also expensive. The equilibrium favors honest, verifiable answers.
USDC and Polygon — why this stack
Why USDC
USDC is a US-dollar-pegged stablecoin issued by Circle. Each USDC is redeemable 1:1 for USD. It's regulated, audited, and the largest stablecoin by compliance score.
Polymarket uses USDC because:
- Price stability. A prediction market priced in a volatile token would be useless — you can't tell if you're up because you predicted well or because the token rallied.
- Dollar familiarity. Traders think in dollars. A 42-cent share is literally 0.42 USDC.
- Onramp ubiquity. Every major exchange (Coinbase, Kraken, Binance) supports USDC.
Why Polygon
Polygon is an Ethereum Layer 2 rollup. It has:
- Cheap gas. A trade costs about a penny.
- Fast finality. Polygon blocks confirm in 2 seconds.
- EVM compatibility. Same tooling, same wallet support as Ethereum mainnet.
- USDC native support. Circle issues USDC directly on Polygon.
Ethereum mainnet gas would make Polymarket economically unviable — a $5 trade cost would destroy user economics for retail trades. Polygon's pennies-per-trade lets the platform operate at internet scale.
The trade-off is that Polygon has somewhat less security than Ethereum mainnet (fewer validators, smaller economic weight). This has not been a problem in practice — Polygon has operated at scale for years without major incident.
Conditional tokens: the mechanical core
The clever piece of the architecture is how the contract represents positions.
Each market has an outcome slot — YES and NO. When you fund a market with 100 USDC, the contract mints:
- 100 YES tokens
- 100 NO tokens
These are called conditional tokens. Together they're exactly worth 100 USDC, because one will pay $1 per token at resolution and the other will pay $0.
The key properties:
- Fungible within outcome. All YES tokens in a market are identical (ERC-1155 tokens with the same token ID).
- Priced independently. YES sells at some price, NO sells at (1 - YES_price) by arbitrage.
- Can be combined. If you hold 100 YES and 100 NO, you can combine them back into 100 USDC at any time (before resolution). This is called merging.
- Can be split. If you hold 100 USDC, you can mint 100 YES + 100 NO anytime. This is called splitting.
Merging and splitting are how market-makers provide liquidity efficiently: they split USDC into YES+NO pairs, sell each side at a spread, and pocket the spread.
Most traders never interact with conditional tokens directly — the Polymarket UI abstracts them. But under the hood, every trade is a conditional-token transfer.
Wallets: magic logins vs self-custody
Polymarket supports two wallet modes:
Magic email login
New users can sign up with just an email. Polymarket creates a wallet for them (via Magic or an equivalent provider) tied to their email. They can trade without ever installing MetaMask.
The wallet is custodial in a nuanced sense: Polymarket holds a key share and the user holds a key share. Neither party can move funds unilaterally (without the other). Polymarket cannot seize user funds, but users cannot withdraw without Polymarket's half of the signature.
This is convenient. It's also a trust assumption — if Polymarket's key server is compromised or goes down, users could temporarily lose access.
Self-custody (MetaMask, WalletConnect)
Experienced users can connect their own wallet. The wallet signs every transaction locally; Polymarket never holds any user keys.
This is the crypto-native path. Gas fees are paid by the user. Position management is entirely in the user's control. Polymarket cannot freeze or touch the account.
For serious traders, self-custody is the recommended mode. For casual users, email login is the low-friction onramp.
How deposits and withdrawals flow
Deposit
The conceptual flow:
- User has USD in a bank account.
- They convert USD → USDC via either:
- Coinbase → withdraw USDC to Polygon address
- Kraken or Binance → same
- In-app MoonPay or Onramper widget → buys USDC directly to their Polymarket wallet
- Cross-chain bridge from Ethereum mainnet USDC
- USDC lands in user's Polymarket-connected wallet on Polygon.
In-app fiat onramp is the simplest path for new users. It costs 3–5% but eliminates the cross-chain complexity.
Withdrawal
Two paths:
- Withdraw to your own Polygon wallet, then bridge/swap. Free aside from gas. Best for crypto-native users.
- Offramp via Onramper/MoonPay. Direct USDC → bank account. 1–3% fee. Subject to KYC for larger amounts.
Polymarket does not directly touch fiat. All fiat flows happen at the onramp/offramp providers.
Resolution and edge cases
Most markets resolve uncontroversially. The UMA oracle mechanic handles 95%+ of resolutions without dispute.
Edge cases that have caused issues:
- Ambiguous criteria. "Will there be a recession in 2024?" — which definition? These markets now specify their resolution source explicitly.
- Late news. Markets that resolve on specific dates can be affected by news breaking hours before the cutoff. Polymarket handles this by using specific, timestamped sources.
- Contested political outcomes. Markets on elections or confirmations have occasionally been disputed when the resolution source (e.g., AP's call) was itself contested. Resolution criteria now typically specify the exact source and timing.
Polymarket maintains a support process for users to raise resolution concerns. Disputed markets can be resolved via UMA vote — this has happened a handful of times and has generally aligned with the obvious correct outcome, though never without community friction.
The public API
Polymarket has a free, public API for market data and historical prices.
GET https://gamma-api.polymarket.com/markets?closed=false&limit=100— list active marketsGET https://gamma-api.polymarket.com/markets/[id]— single market detailsGET https://clob.polymarket.com/prices-history?market=[id]&interval=1d— historical prices- WebSocket streams for live price updates
The API is used extensively by journalists, researchers, and algorithmic traders. Rate limits are generous for retail use (60 requests/minute per IP).
For placing trades via API, you need an authenticated CLOB account — this requires a signature from your Polygon wallet. The Python and JavaScript SDKs handle the signing.
Performance and scale
Polymarket has processed several billion dollars in cumulative volume. Peak single-day volume in late 2024 exceeded $200M. The platform handles this without visible degradation because the heavy lifting (order matching) is in a centralized service, and only settlement is on-chain.
The Polygon network itself has never been a bottleneck for Polymarket. Gas fees are low and block space is abundant.
FAQ
Frequently asked questions
Is Polymarket actually decentralized?+
Partially. Order matching is centralized for performance. Settlement, custody, and resolution are on-chain and trust-minimized. This hybrid is common in crypto exchanges and is the pragmatic choice for performance.
Can Polymarket seize my funds?+
No. Your USDC is held in your wallet (either magic email wallet or your own MetaMask/equivalent). Polymarket cannot unilaterally transfer your funds.
What happens if UMA's oracle fails?+
UMA is one of the largest and most-tested decentralized oracle networks. In the worst case (bug or coordinated attack), Polymarket could migrate to a different oracle, though this would require a contract upgrade and community coordination.
How are market makers compensated?+
By capturing the spread. Market makers split USDC into YES+NO pairs, post both sides of the order book at a spread, and earn the spread as traders cross it.
Does Polymarket take custody of my funds at any point?+
Only during an active trade settlement. At all other times, USDC and conditional tokens sit in the user's wallet. The "magic" email wallets are a 2-of-2 multi-sig, not unilateral custody.
Can I see my positions on-chain?+
Yes. Enter your wallet address on Polygonscan and look at the ERC-1155 token holdings. Each token ID corresponds to a specific market outcome.
Why does Polymarket need crypto at all — why not just use USD?+
Regulatory and technical. The crypto settlement layer is what makes Polymarket operable globally without jurisdiction-by-jurisdiction bank partnerships, and USDC lets prices be denominated in dollars without requiring fiat banking rails.
How does Polymarket compare technically to Kalshi?+
Kalshi is fully centralized — traditional exchange with USD custody and internal resolution. Polymarket is hybrid — centralized order book, decentralized settlement, decentralized oracle. Different trust trade-offs for different users.
Related reading
What is Polymarket? A complete beginner's guide
Polymarket is the world's largest decentralized prediction market, built on Polygon and settled in USDC. Here's how it actually works, what makes it different, and why it matters.
What is a prediction market? The complete primer
Prediction markets let people trade contracts on the outcome of real-world events, turning collective opinion into probabilities. Here's how they work, why economists love them, and what Polymarket and Kalshi bring to the category.
Polymarket fees explained: the complete cost breakdown
Polymarket fees in 2026: a per-trade fee schedule (added late 2025), plus spread, Polygon gas, and onramp/offramp costs. Here's every fee you'll encounter with real-world examples.
How to sign up for Polymarket: the complete step-by-step guide
Create a Polymarket account in under 10 minutes. Full walkthrough covering email signup, wallet setup, USDC funding, and your first trade.