pm-AMM — parimutuel AMM for binary markets
Generic CFMMs are catastrophic for binary outcome tokens, whose price resolves to 0 or 1. Paradigm's pm-AMM derives its invariant from Gaussian score dynamics — the signal follows a Brownian motion and the price is the Black-Scholes binary-option probability. The static invariant over the two tokens' reserves, with liquidity scale $L$:
$(y-x)\,\Phi\!\left(\tfrac{y-x}{L}\right)+L\,\phi\!\left(\tfrac{y-x}{L}\right)-y=0,
\qquad \text{price}=\Phi\!\left(\tfrac{y-x}{L}\right)$
This concentrates liquidity near the 0.50 mark and thins it at the extremes, normalising loss-versus-rebalancing across price levels.
Code: mechanisms/pm_amm.py ·
Demo: examples/sim_pm_amm.py