AMM Pricing
Polymarket's AMM is the engine that prices every market. It's based on the same constant-product invariant as Uniswap, but adapted for binary outcome tokens. Understanding how the AMM prices shares, rebalances after trades, and creates arbitrage opportunities will change how you think about every trade you make on the platform.
The Constant-Product Invariant
The AMM uses a constant-product market maker formula. For a binary market with YES and NO outcome tokens:
Note: The constant k = Q_yes Q_no = 60M 40M = 2,400M. When you buy YES, Q_yes increases and Q_no decreases (minted), keeping k constant. This changes the ratio, which changes P(YES).
? AMM Simulator - Trade and Watch Price Move
Add YES or NO trades to the pool and watch the AMM rebalance. Every trade shifts the ratio and moves the price. The AMM always rebalances to keep the constant product.
AMM Rebalancing - Step by Step
Watch what happens inside the AMM when a trader buys $500 of YES shares on a pool that starts with 60M YES and 40M NO tokens. The invariant rebalances each step.
At P(YES) = $0.60, the AMM issues 500/0.60 = 833.3 YES tokens and 500/0.40 = 1,250 NO tokens.
The trader sells 833.3 YES tokens. The AMM burns YES tokens and mints NO tokens. Q_yes increases from 60M to 60.833M. The constant product k must stay at 2,400M.
The AMM rebalanced and the YES price increased by 1%. The trader bought at $0.600 and the market moved to $0.606.
* Arbitrage: How the AMM Stays Connected to External Prices
The AMM doesn't know the 'true' probability - it reflects the accumulated order flow. But arbitrageurs do. When Polymarket's price diverges from Betfair or another external venue, arbitrageurs close the gap and keep prices synchronized.
Slippage at Different Trade Sizes
The AMM's constant-product means slippage grows faster than linearly with trade size. A 10x larger trade might cost 100x more in slippage. This chart shows how.
The constant-product invariant
The constant-product market maker (CPMM) was popularized by Uniswap but has roots in earlier academic work on automated market making. The core formula is elegant: x y = k, where x and y are the quantities of the two tokens in the pool, and k is a constant that never changes during trades. In Polymarket's binary market, x = Q_yes and y = Q_no, and the price of a YES share is simply P(YES) = Q_yes / (Q_yes + Q_no).
This formula guarantees two things: (1) the AMM never runs out of liquidity - as one side grows, the other shrinks proportionally, keeping k constant and always producing a price, and (2) the price is always a valid probability (between 0 and 1) because it is literally a ratio of token quantities. There is no way for the AMM to produce a price of $1.50 or ?$0.20 - the math doesn't permit it.
The rebalancing dynamics are what make the AMM work as a price discovery mechanism. When a trader buys YES, Q_yes increases and Q_no decreases (the AMM mints NO tokens to keep the collateral balance). This shifts the ratio upward and raises P(YES). The more buying pressure, the higher the price climbs. The reverse happens when traders buy NO. The AMM is always in equilibrium - the price is always consistent with the current token quantities.
Arbitrage and price convergence
The AMM's price is not set by a model - it's a result of all trading activity and particularly of arbitrage between Polymarket and external venues. If Polymarket prices YES at $0.72 but Betfair prices the same outcome at $0.65, professional traders will immediately buy on Betfair and sell on Polymarket, pocketing the $0.07 spread. This trade pushes Polymarket's price down (selling YES -> Q_yes rises -> price falls) and Betfair's price up (buying raises their price), converging the two.
In liquid markets, this arbitrage is continuous and near-instantaneous. The spread between Polymarket and Betfair rarely exceeds the transaction cost (fees + gas + slippage). In thin markets, arbitrage is slower and more expensive - the spread can persist for hours. This is why high-volume markets on Polymarket tend to have prices that closely track external consensus, while long-tail markets may have prices that are more 'noisy' and slower to adjust to new information.
The implication is important: Polymarket's AMM price is not a prediction - it's a market-cleared estimate that reflects all available information, including what's priced on external venues. The price is the best estimate of the true probability, aggregated across all participants and arbitrageurs.
Slippage and trade sizing
Slippage on Polymarket's AMM follows the constant-product formula. For a pool with initial Q_yes = Q_no = 50M (starting price $0.50), the price impact of a trade of size S at price p is: ?p/p ? S/(2 pool_value). A $10K trade in a $1M pool moves the price about 0.5%. A $100K trade moves it about 5%. A $500K trade in the same pool moves it about 25% - meaning you'd buy at $0.625 instead of $0.50.
The quadratic nature of this relationship is critical for large traders. TWAP (time-weighted average price) and VWAP (volume-weighted average price) execution algorithms split large orders into smaller chunks over time to minimize price impact. On Polymarket, this is especially relevant because the CLOB layer can absorb parts of your order at better-than-AMM prices if market makers are posting tight limit orders.
Frequently asked questions
- Is Polymarket's AMM the same as Uniswap's AMM?
- The invariant is the same constant-product formula: x y = k. But Polymarket's AMM is adapted for binary outcome tokens rather than generic token pairs. In Uniswap, x and y are arbitrary token quantities. In Polymarket, x and y are YES and NO outcome tokens in a single market, and the price of YES is always x / (x + y). The key difference: Uniswap price moves with the ratio of token quantities in a pool. Polymarket's AMM moves with the ratio of YES to NO tokens, which is always a valid probability between 0 and 1. The AMM also has a modified fee structure and integrates with the on-chain CLOB as the primary price discovery mechanism - the AMM follows the CLOB, not the other way around.
- Why does the AMM price converge to the 'true' probability?
- Because of arbitrage. If the AMM prices YES at $0.60 but the true probability is $0.55 (as implied by Betfair or another market), arbitrageurs will sell YES on Polymarket (pushing the AMM price down) and buy YES on the external venue. This trade is profitable until the Polymarket AMM price matches the external price. The AMM doesn't have a model of the true probability - it just reflects the flow of arbitrage between venues. The aggregate of all traders and arbitrageurs creates the price, which is why prediction markets are sometimes called 'information markets': the price is a real-time summary of all available knowledge about the question.
- What happens to the AMM price when a large trade executes?
- The AMM rebalances according to the constant-product invariant. If a trader buys $500K of YES at a pool with $1M in total value, the Q_yes increases and Q_no stays the same (because the protocol mints NO tokens to maintain the collateral invariant). This shifts Q_yes/(Q_yes+Q_no) upward. A single large trade can move the price meaningfully in thin markets. In liquid markets (>$10M TVL), a $500K trade typically moves the price 1-3%. This is why large traders use algorithmic execution strategies (TWAP/vwap) to avoid moving the price against themselves.
- How does the AMM create arbitrage opportunities?
- The AMM's price can deviate from external prices due to order flow imbalances. For example, if a series of buyers all bet YES on a market (pushing the AMM price to $0.75), but external venues like Betfair still price YES at $0.68, the spread is $0.07. An arbitrageur can buy YES on Betfair at $0.68 and sell it on Polymarket at $0.75, pocketing $0.07 per share risk-free. This trade pushes Polymarket's AMM price back down. The AMM's continuous rebalancing means arbitrage opportunities are usually small and short-lived - seconds to minutes for large markets, potentially hours for illiquid ones.
- Can the AMM ever price YES at $0 or $1?
- Only at the extremes of the invariant - which requires infinite token quantity in one side. In practice, the AMM approaches $0 or $1 asymptotically as one side becomes dominant, but it never reaches exactly 0 or 1. In real Polymarket markets, when a market has near-100% consensus (like 'Will the sun rise tomorrow?'), the YES price might be $0.99 or $0.995. At those prices, the spread between YES and NO is just a few cents - essentially the fees. In extreme cases where the market is definitely resolved or obviously true, the remaining spread reflects resolution timing risk rather than genuine uncertainty about the outcome.
- What is the 'slippage' on Polymarket and how does it compare to Uniswap?
- Slippage on Polymarket is the difference between the expected price and the actual execution price for a given trade size. For small trades (under $1,000) on liquid markets, slippage is typically under 0.5%. For large trades ($100K+) on thin markets, slippage can be 5-15%. The AMM's constant-product nature means slippage grows quadratically with trade size: a 10x larger trade doesn't cost 10x more slippage - it costs roughly 100x more. This is the same formula Uniswap uses. The key difference is that Polymarket's CLOB layer can absorb large orders without AMM slippage if there are market makers willing to fill at the CLOB price - which Uniswap doesn't have.
- How does the AMM know when to stop pricing a market?
- The AMM continues pricing until the market resolves. After the resolution date, the oracle reports the outcome and the AMM stops trading. Before resolution, the AMM always provides quotes on both YES and NO - the invariant guarantees both prices exist as long as the pool has collateral. However, near-resolution markets with very high consensus (95%+) may have extremely wide effective spreads on the NO side ($0.04 for a 5% outcome) while YES is tight ($0.96). This is the market pricing resolution risk - if the market resolves before you can exit a position, the pricing reflects that uncertainty.