In this post, we will introduce a new type of automated market maker (AMM) tailor-made for prediction markets: pm-AMM.
By Ciamac Moallemi and Dan Robinson, Paradigm
Compiled by: Yangz, Techub News
Introduction
In this post, we will introduce a new type of automated market maker (AMM) tailor-made for prediction markets: pm-AMM.
AMMs and their predecessors, such as market scoring rules, were originally invented as a way to provide liquidity for prediction markets. They now dominate the trading volume of most DEXs. However, ironically, while the volume of prediction markets has risen sharply, most of it uses order books, not AMMs.
One possible reason is that existing AMMs are not well suited for outcome tokens (i.e. if the event happens, the token is priced at $1, and if the event does not happen, the token is priced at $0). The volatility of the outcome token depends on the current probability of the event and the time when the prediction market expires, which means that the liquidity provided by the asset pool is inconsistent. Once the prediction market expires, the liquidity provider (LP) basically loses all its value.
To this end, we propose a new type of AMM that optimizes around these considerations, aiming to address a long-standing question in AMM research, namely, what does it mean to optimize an AMM for a specific type of asset? In other words, given a model for a certain asset (such as options, bonds, stablecoins, or outcome tokens), how does it affect the AMM we apply? We propose a possible answer to this question based on the concept of loss and rebalancing (LVR).
Research Results
We built a model for the price movement of some outcome tokens, which we call Gaussian score dynamics. This model may be suitable for prediction markets, which can predict whether some basic random movements (such as the score difference in a basketball game, the vote difference in an election, or the price of some asset) will be above a certain value at a specific expiration time in the future.
We use this model to derive a new invariant-based AMM for these tokens, the static pm-AMM invariant:
Where x is the reserve of the outcome token in the AMM, y is the reserve of its opposite, complementary outcome token, L is the overall liquidity or proportionality coefficient, ϕ and Φ represent the probability density function and cumulative distribution function of the normal distribution, respectively.
The above invariant is based on a powerful concept called Loss to Rebalance (LVR), which can be thought of as the ratio of an AMM’s losses due to arbitrage. The LVR depends on the shape of the AMM and the price movements of the underlying assets traded on the AMM.
We define a uniform AMM for an asset as one whose LVR, if used for that asset, is proportional to its portfolio value at a given moment in time, regardless of the current price. Milionis et al. argue that constant geometric mean market makers (such as Uniswap and Balancer) are the only uniform AMMs for assets whose prices follow geometric Brownian motion (GBM, a popular model for price movements of common assets such as stocks and cryptocurrencies), while static pm-AMMs are uniform AMMs for assets whose behavior follows our proposed Gaussian fractional dynamics model for the resulting token.
While the static pm-AMM has a uniform LVR (as a fraction of the portfolio value) at all prices, the LVR still increases as the prediction market expiration date approaches. This is because prediction markets can be very volatile as they approach expiration. To adjust the pm-AMM to reduce its liquidity so that the AMM's expected LVR remains constant at all times during the remaining time until expiration, we derive a dynamic pm-AMM invariant that depends on the expiration time T-t:
The dynamic pm-AMM mechanism prevents the LVR from increasing as expiration approaches by providing ever-decreasing liquidity. In a real pool, this is not necessarily desirable, especially since non-arbitrage trading activity (and therefore fees) may also increase over time. However, the pm-AMM provides a framework for liquidity providers to adjust liquidity based on expected fees and how they wish to allocate arbitrage risk.
These AMMs may help to bootstrap passive liquidity in on-chain prediction markets. The concept of a unified AMM and related methods may also be more broadly applicable to DEX designers, who can use these methods to customize AMMs for other types of assets whose price changes do not follow geometric Brownian motion, such as stablecoins, bonds, options, or other derivatives.
Figure 1 shows the invariant curves of static and dynamic pm-AMMs and compares them to other well-known invariant curves, namely the Constant Product Market Maker (CPMM) and the Logarithmic Market Scoring Rule (LMSR). Note that the reserve curve of the dynamic pm-AMM provides lower liquidity over time.
Figure 2 shows the “liquidity fingerprint” that would emerge if the static pm-AMM invariant were implemented on the Uniswap v3 concentrated liquidity AMM, compared to CPMM and LMSR. The horizontal axis corresponds to the logarithmic scale of relative price (the price of the x token divided by the price of the y token), and the vertical axis corresponds to the liquidity of each AMM at that price level. It can be seen that compared to the two alternatives, pm-AMM concentrates more liquidity when the relative price is 1 (with a probability of 50%, that is, the token price is equal to 0.50), and concentrates less liquidity at extreme relative prices (extremely low or extremely high).
Background
Prediction Market
Prediction markets are an increasingly popular application in cryptocurrencies. In October 2024 alone, Polymarket’s trading volume exceeded $2 billion. However, liquidity for most cryptocurrency prediction markets is provided on order books rather than AMMs, even though the latter dominate most DEX trading volume in cryptocurrencies.
One possible reason is that the price behavior of outcome tokens is different from that of ordinary assets, so AMMs designed for them cannot operate stably. For example, imagine a prediction market on a coin tossing game, in which someone flips a coin 1001 times, and each outcome (heads vs. tails) corresponds to two tokens, x and y. In the end, if there are more heads than tails, the x token is worth $1, and if there are more tails than heads, the x token is worth $0; the opposite is true for the y token.
The volatility of these outcome tokens depends heavily on the number of tosses remaining and the current toss situation. The more similar the current situation is and the fewer tosses are remaining, the more volatile these tokens are. This means that the losses of constant product market makers (depending on volatility as described below) vary widely over time.
Figure 3 shows the volatility of the resulting token price as a function of the token price and the remaining time under Gaussian fractional dynamics.
Many popular prediction markets are similar to this coin flipping example, betting on whether a random trend will end above or below 0 at a future expiration time. For example:
In a prediction market on the outcome of a basketball game, the market expires once the time remaining in the game reaches 0. The stochastic move is the score differential between the two teams.
Prediction markets on the outcome of the presidential election expire on election day. The stochastic move is the difference in the number of voters who intend to vote for a candidate.
In a prediction market about whether the price of an asset such as Bitcoin will be higher than a certain strike price at a certain future date, the stochastic trend can be the logarithm of the current Bitcoin price minus a certain strike price.
The Gaussian Fractional Dynamics model, the price movement model for the outcome token we define in this article, is inspired by such examples. The model assumes that the predicted market price matches the probability of some underlying Brownian motion ending above 0. The model is similar to the Black-Scholes model for binary options (a binary option is an instrument that pays a fixed dollar amount if the asset price is above a certain strike price and $0 if the asset price is below a certain strike price). However, in our model, there is no requirement that the underlying process corresponds to the price of a tradable asset.
We did make the simplifying assumption that the price of the outcome token matches the probability that it is $1. This assumption ignores important characteristics of the market, including risk and time preference, so studying how these characteristics affect this model is a topic for future research.
Furthermore, we should also note that not all prediction markets fit the Gaussian score dynamics model, since the model assumes that new information emerges at a predictable rate. For example, basketball games may fit the model better than football games, since the frequency of scoring in basketball games is much higher, and therefore the evolution of the score difference over time will be more consistent. Furthermore, there are some types of prediction markets that are completely different from the model, such as predicting whether some kind of one-time unexpected event (such as an earthquake) will occur before a certain date. But then again, the model may be a useful starting point for deriving models for other dynamics, and can serve as a demonstration of a method for deriving a unified AMM for any model.
Losses vs Rebalancing and Unity
With this model in mind, we derived a mechanism that may be better suited for these tokens than existing AMMs such as constant product market makers, or LMSRs. The guiding metric we use is the expected loss rate for liquidity providers, characterized as “loss-vs-rebalancing,” or LVR.
LVR captures the main adverse selection cost of an AMM: in the absence of trading, the AMM's prices are static, and as new information emerges, prices become outdated. LVR reflects the cost borne by AMM liquidity providers, as these outdated prices can be exploited by better-informed arbitrageurs who will arbitrage trades at prices that are unfavorable to the AMM. Therefore, LVR can be thought of as the fee that the AMM pays to arbitrageurs to have their prices corrected.
Additionally, in the absence of transaction fees, LVR is also the loss that a liquidity provider would incur by delta-hedging their LP position by solely holding a short position with the exact same number of tokens as part of the pool reserve. As such, LVR builds on key insights from the Black-Scholes options pricing model. Just as options remove market risk by delta-hedging with the underlying asset, LVR values LP positions in an AMM after removing market risk. That is, LVR isolates the particularities of being a liquidity provider in an AMM, rather than simply taking on the market risk of holding the same tokens as the AMM reserve.
We consider simple invariant-based AMMs with no fees or MEV recovery mechanisms. In this case, the AMM is bound to lose money due to arbitrage, and no AMM invariant can eliminate the LVR (except for invariants that result in no trades at all). Moreover, even "minimizing" the LVR is meaningless, because reducing the LVR only means reducing the liquidity provided.
However, while we cannot eliminate LVR, we can make it more uniform so that the percentage of the pool value lost does not depend on the current price of the asset. We call this property uniformity.
Imagine a sponsor willing to provide liquidity on a zero-fee prediction market to see what the market predicts an outcome. The sponsor will lose money, but it would also prefer to spread the loss evenly rather than concentrate the loss at a specific time or at a specific price. In this case, the current portfolio value of the asset pool can be thought of as the sponsor's "budget". On a unified AMM, if a sponsor invests $1 of liquidity at a certain time, their expected loss at the next point in time is independent of the current state of the fund pool.
Furthermore, uniformity has potential implications for profit-seeking liquidity providers. Even if an AMM is able to capture some of the gains from losses and rebalances, or even turn a profit (through non-zero swap fees, or through auction mechanisms such as MEV taxes), it still requires some strategy for how to allocate liquidity at different prices and at different times. We can think of the expected loss of a zero-fee pool as a way to measure how much liquidity the strategy allocates at a particular time, taking into account the price process of the asset.
We define a uniform AMM for a particular asset as one whose expected LVR is a constant fraction of the current value of the pool, regardless of the current price of the asset. Note that whether an AMM has a uniform LVR depends on the price process of the asset itself. As shown in Appendix B.2 of Milionis et al., if the price of an asset follows a geometric Brownian motion, then essentially the only uniform AMM between that asset and the data warehouse is a weighted geometric mean market maker, whose invariant is:
This is the formula used in Balancer, and the constant product market maker used in Uniswap v2 is also a special case of it. But for tokens that follow Gaussian fractional dynamics, constant geometric mean AMMs do not have uniform LVRs. The same is true for the Logarithmic Market Score Rule (LMSR).
Figure 4 shows the LVR of CPMM and LMSR for Gaussian fraction dynamic outcome tokens at time T-t=1 compared to the uniform LVR of the static pm-AMM.
With these considerations in mind, we develop two AMMs designed for prediction markets under Gaussian fractional dynamics: one with uniform LVR at any given time, but with increasing LVR as the prediction market expiration date approaches; and another with uniform LVR and constant expected LVR over the remaining time horizon.
As can be seen in Figure 4, CPMM and LMSR experience larger LVRs when the resulting token price is at extremes close to zero or 1. This is because, while price volatility is lower near these points (see Figure 3), the value of the asset pool decays faster at extreme prices. Therefore, a unified AMM should provide less liquidity at extreme prices, which is exactly what the pm-AMM design does (see Figure 2).
Previous research
AMMs originated from prediction markets and market scoring rules (such as LMSR). These rules led to the discovery of constant function market makers (CFMMs), such as Uniswap v2, which are usually characterized by an invariant relationship between the AMM's reserves for each asset. AMMs based on this design have become the mainstream market mechanism for DEXs in recent years.
Recently, insights from financial economics have been applied to understand the costs of automated market makers in the form of loss versus rebalancing (LVR), focusing mainly on geometric Brownian motion. On the other hand, the price dynamics of prediction markets are very different, as their payoffs are finite and of limited duration. Taleb proposed a dynamics based on an underlying observable voting process, while we develop another dynamics based on an underlying observable Gaussian fractional process.
There has been some previous applied research in designing AMMs for non-GBM assets. One example is StableSwap, an AMM designed for stablecoin pairs, which is based on the intuitive premise that AMMs between correlated and mean-reverting assets should concentrate liquidity tightly around a price, but its derivation does not involve modeling the asset price process. Another example is YieldSpace, an AMM designed for zero-coupon bonds. While the derivation of YieldSpace does involve a simple zero-coupon bond pricing model, it does not include a full price process model (the evolution of interest rates is not modeled).
In addition, there is some work in academia that designs real-time market models around beliefs about asset price behavior. One example is the design of Goyal et al. Their framework is designed around maximizing expected active liquidity, rather than aligning expected losses, and thus sometimes produces results that are contrary to ours. For example, their reasoning argues that if liquidity providers expect the relative price of assets to remain around 1, then LMSR (which concentrates liquidity around price 1, as opposed to CPMM) is a good fit; whereas our framework argues that if prices are expected to diverge (as with outcome tokens), then there is reason to concentrate liquidity around 1.
Various AMM models
Automated Market Maker
Consider a prediction market for a single event, and an AMM that trades two competing assets. One of the risky assets is represented by x, which pays $1 if the event occurs and nothing if it does not; the other risky asset is represented by y, with the opposite payment. The AMM maintains the invariant f(x,y)=L, where f(⋅,⋅) is an invariant function of the reserve (x,y) and L is a constant. Given the price P of the x asset (in USD), the value function of the pool is:
This is the value of the pool when the price of x is P. Since holding one unit of each of assets x and y is equivalent to holding cash, we must let the price of y be 1-P. Suppose there is a group of arbitrageurs who observe the price of asset x Pt (and the price of asset y 1-Pt) at every time t. Assuming there are no transaction fees or other frictions, these arbitrageurs will continuously monitor the AMM and try to extract value from any mispricing of the AMM. In pursuit of maximizing their own profits, they will trade against the AMM to minimize the value of the AMM reserve. If we use Vt to denote the value of the reserve at time t (when the price is Pt), then Vt = V(Pt).
Example 1: In the case of a constant product market maker (CPMM), the invariant is f(x,y)≜xy, and the asset pool value function is:
Example 2: The Logarithmic Market Scoring Rule (LMSR) created by Robin Hanson can be viewed as an AMM that satisfies the following invariant.
The value function of its asset pool is (proportional to the binary entropy of the event implied by the price):
Let x ∗(P) and y ∗(P) represent the optimal solutions to the optimization problem (1), and we assume that they exist, are unique, and are sufficiently smooth functions of the price P. Then the following formula is similar to Theorem 1 of Milionis et al., but applicable to the current environment:
Theorem 1. For all prices P ≥ 0, the value function of the asset pool satisfies:
Gaussian fraction dynamics
How do risky asset prices evolve over time according to what we call Gaussian fractional dynamics? Specifically, we assume that there exists a random process {Zt} on the time interval t∈[0,T], where the events are determined by the sign of Zt at the end of the time span t=T: if ZT≥0, then the x asset pays off, and if ZT0, then the y asset pays off. We can think of Zt as the score difference between the two teams in a bilateral competition. Therefore, we will regard Zt as the score process. Note that although our model assumes the existence of this score process, the AMM does not need to observe these processes directly. As described below, the AMM can infer the current value of the score based on the marginal price (after arbitrage) and the expiration time.
We assume that Zt follows random changes. Specifically, we assume that Zt is a Brownian motion with volatility σ>0, that is, dZt=σdBt, where Bt is a standard Brownian motion. Then, it is not difficult to see that the price Pt of asset x at time t is:
where Φ(⋅) is the standard normal cumulative distribution function (CDF). Applying Itô's theorem, Pt must satisfy:
where ϕ(⋅) is the standard normal probability density function and Φ-1(⋅) is the inverse CDF. Note that while the dynamics of the scores and the conversion of scores to prices or vice versa depend on σ, the dynamics of the isolated price process Pt do not depend on σ. The fluctuations of these dynamics as a function of price and remaining time are shown in Figure 3.
Unified AMM
Based on the discussion above, if we use Vt to represent the value of the asset pool reserve at time t (when the price is Pt), then Vt=V(Pt). Applying Itô's theorem, we can conclude that the value of the asset pool changes according to the following formula:
Since the price Pt is a martingale, the second term of (2) is also a martingale and may be increasing or decreasing. However, by V(⋅) (see Theorem 1), the first term corresponds to a negative transformation and is therefore a decreasing process. This is the loss and rebalancing process proposed by Milionis et al., which captures the value lost by arbitrageurs who hedge against the asset pool at unfavorable prices. We define the instantaneous rate of this loss as:
Milionis et al. found that for assets that follow geometric Brownian motion, basically only geometric mean market makers are unified AMMs. In prediction markets under Gaussian fractional dynamics, to investigate (3), the unified LVR pool must solve the following ordinary differential equation (ODE):
This is not possible, because the left side of the equation depends on t, but the right side does not. The core problem here is that the dynamics of geometric Brownian motion is invariant across time, while the dynamics of Gaussian fractional motion is highly dependent on time.
To circumvent this problem, we allow α to be time-dependent, that is, we can set α=β/(T-t), where β>0, then consider such a setting, namely:
This is equivalent to an ODE with P ≥ 0. Moreover, V(⋅) has some additional requirements, such as V′′(P) ≤ 0 (see Theorem 1).
Static pm-AMM
The above ODE can be simplified by changing the variable u=Φ-1(P). When β=1/2, there is a solution that satisfies both the ODE and the additional concavity requirement, and its value is:
The reserves of x and y tokens are:
Here, L ≥ 0 is a liquidity parameter that determines the scaling of the pool size. Observe that y ∗ (P) - x ∗ (P) = L Φ - 1 (P) and substitute it into (5), then the pool reserve (x, y) must satisfy the invariant:
This is the definition of a static pm-AMM. By design, this AMM satisfies the following relationship:
Define Vˉt=E[Vt] as the expected pool value, from (2) we can derive:
Solving this ordinary differential equation, we can get the following answer. In other words, under expected circumstances, the value of the asset pool of the static pm-AMM will decay according to the square root of the remaining time horizon.
Dynamic pm-AMM
One drawback of a static pm-AMM is that while its LVR per dollar of value is uniform across all possible prices, it will change over time. In particular, the loss per $1 of value is inversely proportional to the time to expiration, so it will increase over time until all value is lost at expiration.
Dynamic liquidity. We envision a dynamic time-varying variant of the static pm-AMM design, where AMM LPs extract liquidity over time to reduce losses. Specifically, assuming the value of the fund pool is:
Where Lt is a deterministic smooth function that determines the extent to which liquidity is removed (or potentially added) over time. Applying the Itô theorem to the asset pool value process Vt≜V(Pt,t), we have
Let Ct represent the cumulative USD value of extracted liquidity. Since the value of the fund pool is linearly related to the liquidity Lt, the USD value of the change in Lt is proportional to Vt/LT. We can get:
The total wealth Wt of AMM LPs is composed of the reserve value of the fund pool and the accumulated value of the extracted liquidity, so Wt=Vt+Ct, and satisfies:
This means that the expected wealth of LP Wˉt≜E[Wt] satisfies the following condition, where Vˉt≜E[VT].
Now, consider the specific options for the liquidity curve as follows:
We call it dynamic pm-AMM. According to (7), the expected asset pool value Vˉt=E[Vt] satisfies:
Solving this ordinary differential equation, we can obtain the following answer.
In other words, in the dynamic pm-AMM, after deducting withdrawals, the expected value of the fund pool decreases linearly. In addition, due to the inheritance of the value function of the static pm-AMM, the LVR loss rate per unit time is:
The expected loss rate is the following value, which remains constant over period t. That is, over time, the dynamic pm-AMM will (expectedly) lose arbitrageurs’ funds at a constant rate.
Finally, according to (8), the expected wealth process is as shown in the figure below. Therefore, half of the initial wealth will be lost in the end.
in conclusion
pm-AMM may be applicable to prediction markets driven by dynamics such as Gaussian fractional dynamic models. In addition, our research also shows that unified AMM may be applicable to other types of assets such as bonds, options, and other derivatives.