# Math Behind the Distribution Markets

*Trading entire probability distributions, not just outcomes*

By [Eray's writings](https://paragraph.com/@eray) · 2025-05-14

prediction, markets, math, btc, uniswap, probability

---

Traditional prediction markets have become increasingly popular for forecasting outcomes of events like elections, product launches, and more. They're powerful tools for aggregating collective wisdom, but they've always had a fundamental limitation: they can only handle discrete outcomes.

Think about questions like:

*   "Will candidate X win the election?" (Yes/No)
    
*   "When will the next iPhone launch?" (Choose from Q1/Q2/Q3/Q4 2025)
    
*   "What range will Bitcoin's price be in next year?" (Select a preset range)
    

These questions force us to compress our beliefs into predetermined boxes, even when reality is much more nuanced. What if you think the iPhone will launch on July 2, 2025, specifically? Or that Bitcoin has a 60% chance of being between $50,000-$60,000, but also a 25% chance of hitting $100,000?

  

Introducing Distribution Markets
--------------------------------

Distribution Markets, introduced in a recent [paper by Dave White from Paradigm](https://www.paradigm.xyz/2024/12/distribution-markets), solve this problem by allowing traders to express and trade on entire probability distributions over continuous outcomes.

Unlike platforms like Metaculus that allow expressing distributions but don't enable trading on them, Distribution Markets combine the expressivity of continuous distributions with the economic incentives of prediction markets. Traders can profit by moving the market's probability distribution closer to what they believe is the truth.

The result is a market that discovers not just the most likely outcome, but the entire probability distribution—capturing both the central tendency (like the expected date) AND the uncertainty around that estimate.

From Uniswap to Distribution Markets
------------------------------------

To understand Distribution Markets, let's start with something more familiar: Automated Market Makers (AMMs) like Uniswap.

In Uniswap, the AMM follows a simple rule called a **constant product formula**:

$$xy = k$$

Where $$x$$ and $$y$$ are token quantities and $$k$$ is a constant. This creates a hyperbola—as one quantity increases, the other decreases to maintain their product at exactly $$k$$.

Imagine this as a water tank shaped like a rectangle. The constant product formula ensures that the volume of water (the product of width and height) stays the same, even as you change the shape of the tank.

Distribution Markets also use a constant function, but instead of token quantities, they deal with probability distributions. And instead of a constant product, they use something called the **L2 norm.**

The L2 Norm
-----------

Think of the L2 norm as a measure of how you've allocated your investment capital. Imagine you have $10,000 to invest across different stocks. The L2 norm constraint would be like saying: "You can allocate your money however you want across these stocks, but the square root of the sum of squared investments must equal $10,000."

For example:

*   **Option 1:** Invest $7,071 in Apple and $7,071 in Google (L2 norm = $10,000)
    
*   **Option 2:** Invest $10,000 in Apple and $0 in Google (L2 norm = $10,000)
    
*   **Option 3:** Invest $5,774 in Apple, $5,774 in Google, and $5,774 in Microsoft (L2 norm = $10,000)
    

The L2 norm constraint gives you flexibility in how you allocate resources while maintaining a consistent overall **size** of your position.

### Mathematical Definition

Formally, the L2 norm (also called the Euclidean norm) is defined as:

For vectors (discrete case with $$N$$ possible outcomes):

$$||x||\_2 = \\sqrt{\\sum\_{i=1}^N x\_i^2} = k$$

For functions (continuous case):

$$||f||\_2 = \\sqrt{\\int\_{\\mathbb{R}} f(x)^2 dx} = k$$

In the discrete case, this is just the Pythagorean theorem extended to multiple dimensions. For two dimensions, it's $$\\sqrt{x\_1^2 + x\_2^2}$$ - the straight-line distance from the origin to the point $$(x\_1, x\_2)$$.

In the continuous case, think of it as measuring the square root of the area under the squared function. It's a way to capture the "size" of the function in a single number.

Probability Distributions as Market Positions
---------------------------------------------

Let's use a concrete example: predicting Bitcoin's price at the end of 2025. In a traditional prediction market, you might have to choose:

*   Less than $40,000
    
*   $40,000 - $60,000
    
*   $60,000 - $80,000
    
*   More than $80,000
    

But in a Distribution Market, you can express a complete probability distribution:

*   Trader Alice believes BTC will be $50,000 with a standard deviation of $10,000 (a fairly confident prediction centered around $50,000)
    
*   Trader Bob believes BTC will be $75,000 with a standard deviation of $25,000 (a more uncertain prediction centered around a higher value)
    

The key insight of Distribution Markets is that in an efficient market, trader positions will align with the true probability distribution.

Mathematically, for continuous outcomes:

$$f = k \\cdot \\frac{p}{||p||\_2}$$

Where:

*   $$f$$ is the outcome function (the shape of trader positions)
    
*   $$p$$ is the true probability distribution
    
*   $$k$$ is the AMM's invariant parameter
    
*   $$||p||\_2$$ is the L2 norm of the probability distribution
    

This means that the shape of aggregate trader positions will be directly proportional to the true probability distribution, just scaled to meet the L2 norm constraint!

Why do positions align with probabilities? Because traders want to maximize their returns. A trader's expected return is the dot product of their position with the true probability distribution:

$$\\text{Expected Return} = f \\cdot p = \\int\_{\\mathbb{R}} f(x) \\cdot p(x) dx$$

The Cauchy-Schwarz inequality tells us that this dot product is maximized when $$f$$ is proportional to $$p$$—when your bets align with the true probabilities.

Think of it this way: if you believe an outcome is twice as likely as another, you should put twice as much money on it to maximize your expected return.

**Let's explore another concrete example: "When will Artificial General Intelligence (AGI) be achieved?"**

Trader Alice believes AGI will arrive in 2035, give or take 5 years. Mathematically, she's expressing a Normal distribution with:

*   Mean ($$\\mu$$) = 2035
    
*   Standard deviation ($$\\sigma$$) = 5 years
    

This is expressed as:

$$p\_{Alice}(x) = \\frac{1}{\\sqrt{2\\pi \\cdot 5^2}} \\cdot e^{-\\frac{(x-2035)^2}{2 \\cdot 5^2}}$$

Trader Bob is more uncertain and believes AGI will come later. His belief is:

*   Mean ($$\\mu$$) = 2045
    
*   Standard deviation ($$\\sigma$$) = 10 years
    

$$p\_{Bob}(x) = \\frac{1}{\\sqrt{2\\pi \\cdot 10^2}} \\cdot e^{-\\frac{(x-2045)^2}{2 \\cdot 10^2}}$$

When Alice enters the market, she moves it toward her belief. The AMM scales her distribution to maintain the L2 norm constraint. The scaling factor for a Normal distribution is:

$$\\lambda = k \\cdot \\sqrt{2\\sigma\\sqrt{\\pi}}$$

For Alice with $$\\sigma = 5$$, this gives a larger scaling factor than someone with $$\\sigma = 2$$ would get. This means that distributions with smaller standard deviations (more certainty) will have higher peaks when scaled. Intuitively, if you're more certain about an outcome, you're placing more resources on a narrower range of possibilities.

The L2 norm of a Normal distribution depends only on $$\\sigma$$ (the standard deviation), not on $$\\mu$$ (the mean): $$||p||\_2 = \\sqrt{\\frac{1}{2\\sigma\\sqrt{\\pi}}}$$

This has a practical implication: traders can freely move the market to any mean they believe is correct without affecting the L2 norm constraint. However, changing the standard deviation does affect the norm.

Market Safeguards
-----------------

**Backing Constraints**

Imagine someone claimed to know the exact day AGI will arrive with absolute certainty—essentially a distribution with almost zero standard deviation. If allowed, this would create a very peaked distribution that would require enormous backing to pay out if correct.

To prevent this, Distribution Markets implement backing constraints. For Normal distributions, there's a minimum standard deviation:

$$\\sigma \\geq \\frac{k^2}{b^2\\sqrt{\\pi}}$$

Where $$b$$ is the backing amount and $$k$$ is the L2 norm parameter.

If the market has $1 million in backing and appropriate parameters, this might translate to a minimum standard deviation of 1 year for our AGI example. No trader can express a belief with less uncertainty than that.

**Collateralization**

When you trade in a Distribution Market, you're essentially moving the market from one distribution to another. To ensure you can cover potential losses, you must post collateral equal to your maximum possible loss:

$$\\text{Collateral required} = -\\min\_x{g(x) - f(x)}$$

Where:

*   $$f$$ is the current market distribution
    
*   $$g$$ is the new distribution you're moving the market to
    

For example, if Alice believes AGI will arrive in 2035 (earlier than the market's current estimate of 2040), she's effectively betting that the outcome will be earlier than currently predicted. She needs to post collateral to cover her potential loss if AGI actually arrives much later.

### What Does Trading Actually Look Like?

Let's walk through a complete trade example:

1.  **Current Market State**:
    
    *   The market currently believes AGI will arrive in 2040 with a standard deviation of 7 years
        
    *   The L2 norm parameter $$k = 100$$
        
    *   The backing amount $$b = 1,000,000$$
        
2.  **Alice's Belief**:
    
    *   Alice believes AGI will arrive in 2035 with a standard deviation of 5 years
        
    *   She wants to move the market toward her belief
        
3.  **The Trade**:
    
    *   Alice enters her belief into the trading interface
        
    *   The system calculates the collateral required: $25,000 (the maximum she could lose if AGI arrives after 2055)
        
    *   Alice deposits the collateral and confirms the trade
        
4.  **New Market State**:
    
    *   The market distribution shifts toward Alice's belief
        
    *   The new market estimate is now centered around 2037 with a standard deviation of 6 years
        
    *   Alice's position is the difference between the new and old distributions
        
5.  **Settlement**:
    
    *   When AGI actually arrives (say in 2034), the market resolves
        
    *   Alice's position is worth $40,000 (calculated from her position function at x = 2034)
        
    *   She receives her collateral back plus her winnings
        

This example simplifies some of the mathematical complexity, but it illustrates the basic mechanics of trading in a Distribution Market.

Conclusion
----------

Distribution Markets represent a significant advance in prediction market design, enabling richer expression of beliefs about continuous outcomes. By allowing traders to express and profit from their views on entire probability distributions, these markets provide a much more nuanced view of our collective wisdom about the future.

The mathematics behind them might seem complex at first, but the core insight is elegant: by using the L2 norm as an AMM invariant, we can create markets that naturally discover entire probability distributions, not just expected values.

As information markets continue to evolve, Distribution Markets show how mathematical innovation in mechanism design can unlock new ways of aggregating knowledge and forecasting our uncertain future.

---

*Originally published on [Eray's writings](https://paragraph.com/@eray/math-behind-the-distribution-markets)*
