LMSR Explained: The Math Behind Prediction Market Pricing

Most prediction markets look simple on the surface. You see a question like "Will ETH hit $5k by March?" and a price sitting at 34 cents. That price means the market thinks there's roughly a 34% chance it happens. Easy enough.
But how does that price actually move when someone buys or sells? There's a formula running underneath, and it's called the Logarithmic Market Scoring Rule. LMSR for short. Robin Hanson came up with it back in 2003, and it's still the backbone of most prediction markets today. I think it's one of the most elegant pieces of market design out there.
How Traditional Order Books Fail
Traditional exchanges use order books. Buyers and sellers post their prices, and trades happen when they match. Works great for stocks where millions of people are trading Apple shares every day. Works terribly for prediction markets.
Why? Because prediction markets are thin. You might have a question about whether some niche bill passes Congress, and maybe 40 people care enough to trade on it. With an order book, you'd get massive spreads, stale prices, and trades that barely happen. The market wouldn't actually tell you anything useful.
LMSR fixes this by removing the need for a counterparty. There's no order book. Instead, a market maker algorithm sits in the middle, always willing to buy or sell at some price. You're trading against a formula, not another person.
The Cost Function
Here's where it gets interesting. LMSR uses a cost function based on logarithms. Don't run away. It's simpler than it sounds.
The formula looks like this: C = b * ln(e^(q1/b) + e^(q2/b))
Where q1 and q2 are the quantities of shares outstanding for each outcome, and b is the liquidity parameter. When you want to buy shares, you pay the difference in the cost function before and after your trade.
What this means in practice: when a market is sitting at 50/50, buying a small amount barely moves the price. But as the price pushes toward 90% or 95%, each additional share costs way more and moves the price less. The formula naturally creates resistance at the extremes. It gets exponentially harder to push a market to 0% or 100%, which makes sense because you'd need to be absolutely certain.
The Liquidity Parameter
The b value is where market designers earn their keep. It controls how much the price moves per trade.
Set b low and the market is jumpy. A few dollars can swing the price from 30% to 70%. Good if you want sensitive price discovery, bad if random noise overwhelms the signal.
Set b high and the market is thick. It takes real money to move the price. Good for stability, bad because the market maker (whoever funded the pool) can lose more money subsidizing trades.
There's always a tension here. The market maker is essentially paying for information. That b parameter determines the maximum possible loss, which equals b * ln(n) where n is the number of outcomes. So a binary market with b = 100 can lose at most about $69. That's the price of running the market.
I'd argue most markets set b too low. You end up with prices that bounce around on tiny volume and don't actually reflect what informed people think. Better to eat a bigger potential loss and get prices that mean something.
Why This Matters for Yogen
We chose LMSR for Yogen because it solves the cold start problem. You don't need to wait for buyers and sellers to show up and agree on prices. The moment a market launches, it has a price, it has liquidity, and anyone can trade.
The tradeoff is real though. Someone has to fund that initial liquidity pool, and they'll probably lose money on it. That's not a bug. It's the cost of generating useful probability estimates. Think of it like paying for a really accurate poll, except the poll updates in real time and people have actual money on the line.
LMSR also has a nice property that traditional order books don't: it's path-independent. The final cost of getting from price A to price B is the same regardless of what happened in between. Doesn't matter if the price bounced around wildly or moved in a straight line. You pay the same. This makes the math clean and the market harder to manipulate through wash trading.
Other approaches exist. Polymarket uses a constant product AMM similar to Uniswap. That works too, but I think LMSR's bounded loss property makes it better suited for prediction markets where the subsidy question matters most.
So next time you see a prediction market price, remember there's a logarithm doing the heavy lifting. It's not just supply and demand. It's a carefully designed function that turns money into probability estimates. And honestly, that's pretty cool.