On-chain automated market makers for prediction markets

Automated market makers (AMM) provide an easy way to offer liquidity. At the core, a liquidity provider (LP) will put in the capital that is used to provide liquidity. The market could be a token pair (ETH/DAI) or alternatively a prediction market (collateral token/ outcome token).

LMSR vs constant product market maker
A well known AMM in the prediction market world has been the LMSR market maker proposed by Robin Hanson.
11
While we have implemented the LMSR market maker on-chain and are using it in products like sight.pm it comes with drawbacks. Since its cost function uses a logarithm, especially when calculating price movements for many outcomes this can become very gas costly.
Another market maker formula is the constant product formula: x*y = k
It became well known by Uniswap and is also used in a more general form by balancer.
24
The advantage of those formulas is that it is easier to calculate trading rules on-chain. This allows is also to tokenize LP shares and gives users the option to at any point add or remove liquidity without moving the price (in LMSR this would be changing the b parameter).

Allowing anyone to add and remove liquidity at any point potentially changes the way we look at AMM. The LMSR has been primarily understood as a SUBSIDY for the market. The idea was that a entity interested in a prediction on the event would pay that amount with only expecting (public) information in return.

How do the market maker behave:
LMSR:
if one outcome is known to be the right outcome THE WHOLE FUNDING can be extracted.
if one outcome is known to be the wrong outcome only a bounded fraction of the WHOLE FUNDING can be extracted
CPMM:
if one outcome is known to be the right outcome THE WHOLE FUNDING can be extracted.
if one outcome is known the be a wrong outcome THE WHOLE FUNDING can be extracted.

A practical example:
You are funding a prediction market about who becomes the next president. The outcomes are Trump, Biden, someone else. In the case of CPMM you can drain all the funding by betting against “other” while in LMSR the amount you can drain is capped to around a third of the funding.

The practical implication is that the CPMM only works well if all outcomes have a real winning chance. A particularly problematic use case would be a market where one outcome can literally become impossible early. E.g. if you ask at what time something will happen (April, May, June, July, later) and April already passed and thus is impossible.
In those case it is important to remove all the funding before April becomes impossible and create a new market with only the remaining options.

1 Like