🎉 Hey Gate Square friends! Non-stop perks and endless excitement—our hottest posting reward events are ongoing now! The more you post, the more you win. Don’t miss your exclusive goodies! 🚀
🆘 #Gate 2025 Semi-Year Community Gala# | Square Content Creator TOP 10
Only 1 day left! Your favorite creator is one vote away from TOP 10. Interact on Square to earn Votes—boost them and enter the prize draw. Prizes: iPhone 16 Pro Max, Golden Bull sculpture, Futures Vouchers!
Details 👉 https://www.gate.com/activities/community-vote
1️⃣ #Show My Alpha Points# | Share your Alpha points & gains
Post your
Upgrading the pricing mechanism of prediction markets: Evolution from LMSR to off-chain order book
From AMM to Order Book: Exploring the Shift in Pricing Mechanism of Prediction Markets
A prediction market is essentially a "probability exchange for future events," where users can express their judgment on an event by buying a certain option. Since buying into probability events differs from common trading, the pricing and liquidity mechanisms initially used in prediction markets are also different from the typical AMM algorithms.
The pricing mechanism of prediction markets has undergone tremendous changes from its initial version to now. Initially, an AMM mechanism was adopted to provide liquidity and pricing in real time, known as the logarithmic market scoring rule (LMSR). This algorithm is currently also used by some other crypto protocols. Understanding the characteristics of LMSR allows one to understand the pricing mechanism of prediction markets during most periods, as well as the reasons why other protocols choose LMSR, and it also clarifies the reasons for the upgrade of prediction markets from LMSR to off-chain order books.
Features and Advantages/Disadvantages of LMSR
What is LMSR?
LMSR is a pricing mechanism specifically designed for prediction markets, allowing users to buy "shares" of a particular option based on their judgment, while the market automatically adjusts prices according to total demand. The main feature of LMSR is that it allows trading without relying on counterparties; even if you are the first trader, the system can still price and execute your trade. This gives prediction markets a form of "perpetual liquidity" similar to automated market makers.
In simple terms, LMSR is a cost function model that calculates prices based on the "shares" of various options currently held by users. This mechanism ensures that prices always reflect the expected probabilities of different event outcomes in the current market.
The core formula of LMSR
The cost function C of LMSR is calculated based on the number of shares sold for all possible outcomes in a market. Its formula is:
C(q1,...,qn) = b * ln(Σexp(qi/b))
The symbols here represent:
The most important feature of this formula is that the sum of the prices of all outcomes is always equal to 1(ΣPi=1). When a user purchases a "yes" share, q(YES) increases, causing P(YES) to rise, while P(NO) decreases, thus maintaining the total price sum at 1.
How is the pricing generated for ###?
Another key point of LMSR is that the price is the marginal derivative of the cost function. That is, the price pi of the i-th option is the marginal cost you need to pay when buying one more unit of that option:
pi = ∂C/∂qi = exp(qi/b) / Σexp(qj/b)
This means:
For example, in a "yes/no" prediction market, if the majority buys "yes", then the price of "yes" may rise to 0.80, while "no" drops to 0.20, which is like saying "the market thinks the probability of the event occurring is 80%".
In addition, regardless of the type of liquidity, the curve of the cost function extends upward. This means that the more shares purchased, the higher the total cost that needs to be paid.
The role of the liquidity parameter b: The size of the b value directly determines the "smoothness" of the curve, which is the liquidity or "thickness" of the market.
High liquidity (large b value) acts like a "buffer" that allows the market to absorb greater purchasing power without significant price fluctuations (the curve is flat); low liquidity is very sensitive (the curve is steep).
The Mechanism Trade-offs of LMSR and the Paradigm Shift of Prediction Markets
Before discussing the evolution of prediction markets towards an order book model, it is necessary to first analyze the early adopted LMSR mechanism. LMSR is not a simple technical option, but rather a set of underlying protocols with a clear design philosophy and inherent trade-offs, whose characteristics determine its historical positioning at different development stages of prediction markets.
The core mechanism and design trade-offs of LMSR
The fundamental design goal of LMSR is information aggregation, not the profitability of market makers. It solves the most challenging "cold start" problem for prediction markets through an automated mathematical model, which provides liquidity in the early stages when there is a lack of counterparties.
Advantage Analysis: Unconditional liquidity provision and controllable market-making risks
The core contribution of LMSR lies in ensuring that there are always counterparties in the market at any given point in time. Regardless of how unpopular or extreme the market view may be, market makers can always provide a buy or sell quote. This fundamentally resolves the dilemma faced by traditional order books in early markets where thin liquidity prevents transactions from occurring.
In this context, the market makers providing guarantees for this "infinite" liquidity have a potential maximum loss that is predictable and bounded. The maximum loss is determined by the liquidity parameter "b" and the number of market outcomes "n", with the formula "maximum loss = b⋅ln(n)". The certainty of this risk makes the cost of sponsoring a prediction market manageable, eliminating the risk of infinite losses, which is crucial for parties or organizations that need to launch new markets.
Intrinsic Flaws: Static Liquidity and Non-Profit Orientation
However, the advantages of LMSR also bring about its insurmountable structural flaws.
The b parameter dilemma and static liquidity: This is the core constraint of LMSR. The liquidity parameter "b" is set at the market's creation and typically remains unchanged throughout the market's lifecycle. A large "b" value indicates deep liquidity and stable prices, but a slow reaction to new information; a small "b" value means price sensitivity and rapid aggregation of opinions, but a fragile market with high volatility. This static setting prevents the market from adaptively adjusting its depth and sensitivity based on actual changes in liquidity and variations in information flow.
The role of market maker subsidies: The LMSR model theoretically has a mathematical expectation of loss. The losses of market makers are seen as the "information cost" they pay to acquire the collective wisdom of the market (i.e., the final accurate price formed by all trades). This positioning determines that it is essentially a system subsidized by the initiators for trading, which is not suitable for profit-seeking market maker models and makes it difficult to build a profitable ecosystem involving many decentralized LPs.
In addition, when LMSR is implemented on-chain, the logarithmic and exponential operations involved consume more Gas compared to the common arithmetic operations in DEX, further increasing the trading friction in a decentralized environment.
Paradigm Shift: The Logical Necessity of Prediction Markets Abandoning LMSR
In summary, LMSR is an efficient and practical tool during the early stages of the platform when liquidity is scarce. However, once the user and capital volume of the prediction market surpasses the critical point, its design, which sacrifices efficiency for liquidity, turns from an advantage into a constraint for development. Its transition to an order book model is based on the following strategic considerations:
Fundamental demand for capital efficiency: LMSR requires market makers to provide liquidity across the entire price range from 0% to 100%, which leads to a large amount of capital being tied up at price points with very low transaction probabilities, resulting in low capital efficiency. The order book allows market makers and users to precisely concentrate liquidity in the most active price ranges of the market, which aligns closely with professional market-making strategies.
Optimization of trading experience: The algorithmic characteristics of LMSR determine that any scale of trading inevitably generates slippage. In markets with increasingly thick liquidity, this inherent trading friction can hinder the entry of large funds. However, a mature order book market can absorb large orders through dense counterparty depth, providing lower slippage and a better trading execution experience.
The strategy to attract professional liquidity requires: the order book is the most common and familiar market model for professional traders and market-making institutions. Shifting to an order book means that the prediction market has sent a clear invitation signal to professional liquidity providers in the crypto world and even in traditional finance. This is a key step for the platform in moving from attracting retail participation to building professional-level market depth.
Current Pricing and Liquidity Mechanism of the Prediction Market
The upgrade of the prediction market is an inevitable choice after reaching a critical point in user scale and platform maturity. Behind this transformation is a systematic consideration of three key objectives: trading experience, Gas costs, and market depth. Its current architecture can be analyzed from two perspectives: liquidity mechanisms and price anchoring logic.
mixed mode of on-chain settlement and off-chain order books
The liquidity mechanism of the prediction market adopts a hybrid architecture that combines on-chain and off-chain elements, aiming to balance the security of decentralized settlement with the smooth experience of centralized trading.
Off-chain order book: Users' limit orders are submitted and matched on off-chain servers, making operations instantaneous and without Gas costs. This makes the trading experience of the prediction market similar to that of centralized exchanges, allowing users to intuitively see the market depth (buy and sell orders) composed of all limit orders. Liquidity thus comes directly from all trading participants themselves, rather than from passive liquidity pools.
On-chain settlement: When buy and sell orders in the off-chain order book are successfully matched, the final asset delivery step will be executed on-chain through smart contracts. This "off-chain matching, on-chain settlement" model retains the flexibility of the order book while ensuring the finality of transaction results and the immutability of asset ownership. The displayed "price" is the midpoint between the best buy and sell prices in the off-chain order book.
The underlying logic of price anchoring ------ share against minting and arbitrage cycle
For prediction markets, the core mechanism is how to ensure that the sum of probabilities for the two outcomes "yes" (YES) and "no" (NO) always equals 100% (i.e., "$1"). The order book model itself does not enforce the limit order price through code, but rather through a sophisticated underlying asset design and arbitrage mechanism, utilizing the market's own correction power to ensure that the total price always converges towards "$1".
The cornerstone of this mechanism is an unshakeable value equation established at the contract layer.
Minting: Any participant can deposit "$1" stablecoin into the contract and simultaneously receive 1 YES share and 1 NO share. This operation establishes the underlying value peg of "1 YES share + 1 NO share = $1".
Redemption: Similarly, any participant holding 1 YES share and 1 NO share at the same time can combine them and return them to the contract at any time to redeem "$1" stablecoin.
This bidirectional channel ensures that the total value of a complete set of results is securely anchored at "$1".
Based on the above foundation, YES shares and NO shares act as two independent assets, trading against stablecoins on their respective order books. Participants can freely place limit orders at any price, and the protocol layer does not impose restrictions on this.