Prediction markets (Prediction Market) translate real-world event outcomes into tradable contracts—"the Democratic candidate wins the 2026 US election," "BTC's month-end close is above $120,000," "a certain player scores more than 2.5 goals in this match." Users buy and sell "Yes/No" or multi-outcome shares to price the probability of an event and receive one unit of collateral (typically USDC, USDB, or a platform stablecoin) when the outcome resolves correctly.

The trading mechanism of prediction markets is fundamentally different from that of a spot DEX. A spot DEX trades two assets that each have "independent value," whereas in a prediction market, all outcome shares together sum to exactly one unit of collateral. This means the market maker is not facing a relative price between two asset classes, but a probability distribution whose total is conserved. This fundamental difference gave rise to a dedicated family of pricing functions—LMSR (Logarithmic Market Scoring Rule) and its variants LS-LMSR, constant-product / constant-mean multi-outcome AMMs, and hybrid order-book + AMM models.
For a team that wants to build a prediction market, the choice and implementation of the AMM directly determines three things:
This article starts from the underlying mathematics of prediction markets and systematically reviews LMSR and its variants, the unified model for multi-outcome events, share split and merge, liquidity provision, fees, oracle resolution, risk control and arbitrage bounds. Combined with the practices of mainstream protocols such as Polymarket, Augur, and Manifold, it presents SoonTech's complete design for landing prediction-market AMM solutions. Whether you are a product manager, smart-contract engineer, market maker, or risk-control lead building a prediction market, or a team looking to embed prediction-market capabilities into your own application, after reading this article you will have a complete framework that can be used directly for design and review.
The core financial structure of a prediction market is the "Complete Set." For an event with N possible outcomes, a user deposits 1 USDC of collateral and can mint N shares—one share of each outcome, so that 1 USDC maps to outcome_0(1) + outcome_1(1) + … + outcome_{N-1}(1). When the event is Resolved, exactly one outcome (or multiple outcomes according to some weighting) is judged the "winner." Each winning share can be redeemed for 1 USDC, and losing shares are worth 0. This means:
This structure differs from Parimutuel (the pool-betting system used in horse racing): under parimutuel, the odds are only determined at the last moment, whereas in a prediction market, prices move continuously and holders can close out at market prices at any time to realize their profit and loss.
Different forms can be unified mathematically: view the event as an "outcome vector" and assign a redemption weight w_i ∈ [0,1] to each outcome at resolution, with Σ w_i = 1. A binary market has only one w_i = 1; a multi-winner market may have several w_i as fractions.
DimensionSpot DEXPrediction MarketCollateral | Both assets have independent value | All outcomes sum to 1 unit of collateral |
Price range | Any positive number | [0, 1], with a conserved sum |
Expiry | Usually none | Has a defined resolution time |
Source of return | Fees, price appreciation | Fees, betting correctly on the probability |
Market-maker risk | Unlimited loss (one-sided price movement) | Bounded loss (worst loss = liquidity parameter b) |
Oracle | Spot price (for valuation) | Event outcome (determines final redemption) |
The most essential difference is in the last row: the worst-case loss of a prediction-market maker is bounded, because there exist two risk-free operations—minting a complete set and redemption—which provide a natural anchor for market making and arbitrage.
LMSR was proposed by Robin Hanson in the early 2000s and is the most widely used market-making formula in prediction markets today. For an event with N outcomes, let q_i be the number of shares of each outcome i. The cost function the market maker uses for pricing is C(q) = b · ln( Σ exp(q_i / b) ), where b is a positive number called the "liquidity parameter." The cost of buying Δq_i shares of outcome i is cost = C(q + Δq_i) − C(q); selling (negative Δq_i) yields the corresponding revenue. The instantaneous (marginal) price of each outcome is p_i = ∂C/∂q_i = exp(q_i/b) / Σ_j exp(q_j/b). You can verify that Σ p_i = 1 and p_i ∈ (0,1), naturally satisfying the probability interpretation.
b is the most critical parameter in LMSR. It simultaneously determines two things:
In other words, providing deeper liquidity requires bearing a greater worst-case loss. This is a fundamental tradeoff: b cannot be arbitrarily enlarged; it must match the ceiling of collateral the market maker is willing to commit.
For a standard binary market, to support a price range of 0.01–0.99, the required collateral is approximately b·ln(2). Hence b is also often directly called "funds" or "initial liquidity."
Advantages:
Problems:
These problems gave rise to a number of variants.
The core idea of LS-LMSR is to make b change dynamically with the capital that has been deployed: when more LPs join, b automatically increases and the price curve flattens; when capital withdraws, b decreases. This avoids the "capital wasted at extreme prices" issue under a fixed b, and is the solution adopted by protocols such as Augur.
In implementation, a "swap fee" and a "liquidity score" are usually introduced:
The mathematical details of LS-LMSR are more complex than LMSR, especially the need to ensure that LPs cannot arbitrage by "deposit–withdraw." But it significantly improves the efficiency of liquidity allocation.
Another approach is to generalize Uniswap-style x*y=k to N outcomes, defining the "share product" as Π_i q_i = k. But naively using this formula breaks the conservation Σ p_i = 1. In real engineering, a "virtual balance + share renormalization" approach is usually adopted: view the prices of all outcomes as a point on the probability simplex, use a geometric mean or a harmonic function for pricing, and use the mint / redeem complete-set arbitrage operations to keep prices anchored.
This scheme is in some multi-outcome scenarios cheaper on gas (no exp needed), but the mathematical properties are not as clean as LMSR, arbitrage holes are more likely, and rigorous invariant testing is required.
Protocols such as Polymatch / Manifold have proposed setting b to a negative value or a piecewise function to obtain different liquidity densities in different price ranges. Such variants can "lower slippage close to 0/1 while keeping it tight in the middle," suiting high-frequency odds markets (sports, esports), but the mathematical proof and contract implementation are more complex.
Some advanced designs allow "negative liquidity" to appear in certain price ranges, i.e., the market maker actively sells deeply out-of-the-money shares, which is essentially similar to selling options. This requires the market maker to have sufficient collateral and risk-control capability, and is usually opened only to professional market makers.
Regardless of which pricing function is used, the engineering recommendation is to use a unified data model:
outcomes[], each outcome has q (current share count);resolution_weights[] is written, with Σ w_i = 1;This abstraction unifies binary, multi-outcome, multi-winner, and scalar markets inside the same contract:
The fundamental reason prediction markets can price stably is that there exist two risk-free operations:
If the sum of market prices is greater than 1, an arbitrageur will mint a complete set, sell each outcome separately into the market, and lock in a profit; if the sum of prices is less than 1, the arbitrageur will buy one share of each outcome in the market and then Merge to redeem 1 USDC. This guarantees Σ p_i ≈ 1 (with a no-arb band after fees).
These two operations must be provided as first-class citizens in the contract and must share the same share ledger with the AMM.
In a multi-outcome scenario, a user may not want to buy the complete set, but instead wants to split "Democrats win" into more granular sub-outcomes (e.g., "a specific candidate wins" and "some other Democrat wins"). This is the event hierarchy:
Shares of parent and child events can be split and merged according to conditional probabilities. This allows the platform to compose any complex event tree from a set of small multi-outcome markets, without having to list dozens or hundreds of outcomes in one market (the latter would explode LMSR's gas cost).
Shares are ERC-1155 or ERC-20 (one token per outcome) and can be transferred in any market. The AMM is only the main source of liquidity and does not prevent over-the-counter trading or limit orders. This leaves room for future integration with OpenSea, Blur, and order-book DEXes.
After an event expires, the oracle writes resolution_weights and share holders redeem collateral by weight. Key design points:
The sources of prediction-market liquidity fall roughly into three categories:
The three models can coexist. But note: under LMSR, LP PnL = fee income ± inventory PnL caused by price movement. When new information appears and prices move sharply, the LPs that entered earlier may lose money. This is similar to "impermanent loss" in Uniswap V2, but because there is an expiry and a bounded maximum loss, the risk structure is easier to quantify.
LPs deposit USDC and receive an LP token (ERC-20), which entitles them to:
Design points to watch out for:
Pure-AMM prediction markets still show obvious slippage on large orders. Professional traders and market makers are more used to an order book: they are willing to post limit orders and earn the spread instead of paying AMM fees. Hence CEX-style prediction markets (and some DEX-style ones such as Polymarket's CLOB) adopt a hybrid architecture:
The hybrid architecture significantly improves the large-order experience, but engineering complexity is a step up—it requires a matching engine, risk control, margin, and loss handling. When SoonTech builds prediction markets for clients, we usually offer both modes and bring them online in phases based on user profile.
More advanced schemes adjust b dynamically based on the following factors:
But dynamic adjustment must follow explicit on-chain rules and cannot be modified at will by operations, otherwise a "whale adjusting b" trust problem will appear.
Common fee types in prediction markets:
The fee structure must avoid one issue: if you charge both a trading fee and a profit fee, the arbitrageur's no-arb band widens, and the sum of prices can persistently deviate from 1, hurting user experience. At design time, the legal range of Σp_i must be made explicit with a mathematical formula.
UGC prediction-market platforms (e.g., Polymarket, Augur) allow anyone to create events. Typical incentive mechanisms are:
This mechanism must balance "encouraging open creation" against "preventing spam / manipulated markets." Bond parameters and the appeal process are key.
Protocols can use token rewards to early LPs and active traders to bootstrap liquidity and volume. But note:
The final value of a prediction-market asset is entirely determined by the resolution outcome; the oracle is the most sensitive link in the trust chain. A complete resolution flow usually includes:
Optimistic oracles such as UMA use a "propose first, wait 1–2 hours for a challenge window, considered passed if unchallenged" model. This is efficient enough on the vast majority of markets and does not require voting every time. Only when a dispute arises does it enter the truly expensive dispute-resolution flow.
To avoid a single data source failing, on high-value markets it is recommended to:
A more cutting-edge approach requires the result to come with verifiable evidence: API signatures, verifiable proofs of official web pages, and digital signatures from news organizations. This reduces "who decides" disputes, but the infrastructure bar is high.
A market may be judged invalid (Invalid) for the following reasons:
Common approaches:
It is recommended to default to "equal-proportional redemption," and use the "invalid-market insurance pool" funded by a small slice of every trade to make additional compensation in special cases.
The dispute mechanism must make both "wrong proposal" and "malicious challenge" costly:
Augur's "fork mechanism" is the ultimate tool: if a dispute cannot be resolved, the entire protocol forks into multiple versions and lets the market vote with its feet. This is heavy, but it guarantees ultimate correctness.
Prediction markets in many jurisdictions touch on:
Different chains / deployment modes face different regulators: Polymarket has previously delisted some markets and introduced geoblocking in response to US regulation. Before designing the product, local counsel must provide an opinion, and the protocol must support geoblocking and auditable compliance tools.
Ordinary users do not understand what 0.63 means, but they do understand "63% probability" and "bet 1 USDC to win back 1.59 USDC." The frontend must display simultaneously:
For sports markets, also display the schedule, data and head-to-head history to lower the user's decision cost.
Making shares standard tokens at contract design time is the key to capturing ecosystem dividends.
Solidity has no native floats; the exp / ln required by LMSR is usually implemented as:
Whichever you choose, full fuzz testing is mandatory: under extreme q values, verify the invariant Σ p_i = 1 (within error), that the maximum loss does not exceed b·ln(N), and that Mint/Merge is always no-arbitrage.
Recommended modular layout:
Separating AMM logic from shares and resolution lets you upgrade the market-making algorithm without downtime.
The on-chain data structure of prediction markets is complex (conditions, shares, positions, resolution), so you must build your own indexer with Subgraph / Ponder / Envio to provide:
ProtocolMarket-Making MechanismResolutionCharacteristicsAugur / Augur v2 | LS-LMSR | Own REP token voting + fork | Fully decentralized resolution, gas-heavy |
Polymarket | CLOB (order book) + external AMM | UMA optimistic oracle | Good UX, professional market makers |
Manifold | In-house LMSR variant | Various | Sports / current affairs |
Gnosis Conditional Tokens | Conditional-token framework, composable with any AMM | Pluggable | Suited to be infrastructure |
Drift / Predict | Hybrid AMM + order book | Internal + multi-source | L1 / app-chain style |
Several observations:
SoonTech's prediction-market suite includes:
Scenario 1: Sports and esports prediction markets for Southeast Asia
The client wants to launch football, basketball and esports prediction in Indonesia, Vietnam and the Philippines. We deploy LMSR as base liquidity, layer in third-party market-maker order books for popular events, use multi-source sports data API aggregation + manual review for resolution, and support local payment and stablecoin deposit on mobile. Three months after launch, monthly volume exceeds $80 million with dispute rate under 0.3%.
Scenario 2: Political and macro event markets embedded in a CEX
The client is a mid-sized CEX that wants to add event contracts like "BTC month-end price" and "Fed rate cut" in its existing App. We use a CLOB + AMM hybrid architecture; the oracle prefers Chainlink and official announcements; the event contracts are wired into the CEX's unified margin system so users can use their existing contract positions as collateral.
Scenario 3: A UGC prediction-market platform
The client wants a platform where "anyone can create a market." We deploy the full Event Factory + Creator bond + UMA Optimistic Oracle, and implement market review, reporting and appeal workflows. The matching frontend supports templated creation (sports, politics, crypto, entertainment) to lower the creation bar.
Minimum team: 1 PM, 2 smart-contract engineers, 1 backend / indexer, 1 frontend / mobile, 1 risk / data, 1 ops / market review. Adding an order book requires 1–2 more matching engineers; UGC and dispute mechanisms require content review and legal support.
AI Agents will become important participants in prediction markets: they scrape news, social media and on-chain data in real time and trade rapidly before the event outcome becomes clear. This will improve market efficiency, but also raises concerns about "bots squeezing out retail." Designs such as delayed disclosure, tiered fees and dedicated Agent markets can be used to address this.
Turning RWA events such as interest rates, FX, commodities, and insurance claims into prediction markets for pricing is a growing direction. It blends traditional finance's forwards / options with prediction markets and raises the bar on compliance and settlement.
As prediction markets scale, oracle resolution will evolve from "optimistic assertion" to "verifiable fact": digital signatures from news organizations, cryptographic proofs from official APIs, and ZK-Coprocessors handling complex data will all become infrastructure.
Prediction markets trade frequently with small per-trade amounts, and are naturally suited to high-throughput, low-gas L2s or app-chains. In the next 1–2 years, more dedicated prediction chains will appear, or prediction-market app-chains on existing L2s.
Jurisdictions such as the US, UK, EU, Singapore, and Dubai are progressively clarifying the regulatory boundary of event contracts. A clear compliance framework will let institutional capital and traditional market makers enter, and the total size of prediction markets is expected to grow by an order of magnitude.
Q1: What is the fundamental difference between LMSR and a Uniswap-style AMM?
A: LMSR prices a set of probabilities—prices always sum to 1. Uniswap prices the relative value of two independent assets. The LMSR market maker's maximum loss is bounded (b·lnN); Uniswap LPs have unbounded impermanent loss. Both use the AMM idea, but the math and risk profile differ greatly.
Q2: Why is there still slippage when buying even though the price is already very certain (e.g., 0.99)?
A: LMSR's softmax still has slope near p = 0.99. Pushing the price from 0.99 to 0.995 can cost even more than pushing it from 0.5 to 0.6. This "liquidity gets more expensive at extreme prices" phenomenon is a common criticism of LMSR; LS-LMSR and similar variants are designed to improve it.
Q3: Will the market maker / LP lose money?
A: Yes. When the market reprices sharply on new information, market makers that built inventory earlier may lose money. The maximum loss is bounded (b·lnN), but the actual loss depends on the price path. LPs should plan to cover such losses with fee income and be cautious about providing liquidity on high-volatility events.
Q4: If I have conviction about the outcome, at what price should I buy?
A: Buy Yes when your subjective probability is higher than the market price (p_market < p_you); the expected return is then positive. But also factor in resolution risk, liquidity, fees and time cost. Don't risk 1% on a wrong resolution just to win 1% at a price of 0.99.
Q5: What happens if the market is judged invalid?
A: The mainstream approach is that all shares redeem equally at 1/N, plus additional compensation from the "invalid-market insurance pool." Read the platform's invalid-market policy before trading, and avoid betting on markets with ambiguous descriptions.
Q6: How long does it take to build a prediction market from scratch?
A: A basic LMSR + binary market + simple oracle can reach testnet in 3–4 weeks; including multi-outcome, LP vault, hybrid order book, dispute mechanism, full frontend and risk control usually takes 3–4 months. It is recommended to customize on a mature suite (such as SoonTech's solution) rather than write from scratch.
The AMM of a prediction market looks on the surface like just a pricing formula, but it sits at the intersection of financial engineering, decentralized resolution, oracles, risk control, compliance and user experience. LMSR has become the industry standard not only because of its elegant math, but also because its maximum loss is bounded, its price naturally satisfies a probabilistic interpretation, and it is perfectly compatible with "complete-set arbitrage." But what really determines the success or failure of a prediction-market product is rarely the pricing function itself—it is the credibility of the resolution mechanism, the depth of liquidity, the rigor of risk control, and the smoothness of the user experience.
This article has systematically walked through the complete design space of prediction-market AMM, from financial structure, LMSR and its variants, share system, liquidity provision, fee incentives, oracle resolution, invalid markets, risk and compliance, frontend experience, engineering implementation, to a comparison of mainstream protocols. As the 2026 US election, the World Cup, crypto ETFs and macro interest-rate events keep pushing prediction markets into the mainstream, the field is poised for a new round of product and infrastructure explosion.
The SoonTech team has deep experience across multiple product lines including prediction markets, CEX, and DEX. Prediction-market AMM is one of our most differentiated modules, already live across Southeast Asian sports, CEX event contracts, UGC platforms and more. If your team is building a prediction market, adding event contracts to an existing trading platform, or looking to embed prediction capability into your own application, we would love to chat. Based on your target market, user profile and compliance requirements, we can deliver an end-to-end solution from contract development, oracle integration and risk design to frontend and App.
Let the wisdom of the crowd be priced, let information discovery be more efficient, and let everyone with a view be able to participate—this is the long-term value of prediction markets, and the reason we keep refining the infrastructure.
🌐 Build secure and scalable Web3 platforms with SoonTech.
Explore our solutions for White Label Crypto Exchanges, Prediction Markets, MPC Wallets, Matching Engines, Liquidity Integration, and Compliance.