Interactive demos

Running the JavaScript ports in docs/js/mechanisms.js — the same code checked for numerical parity against the Python library in tests/test_js_parity.py.

LMSR prices & cost

A two-outcome logarithmic market scoring rule. Drag to buy shares of outcome A; watch the prices (implied probabilities) move and the cost accrue. The market maker's loss is bounded by $b\log n$.

Parimutuel implied odds

Stakes on three outcomes set the pool fractions (implied probabilities) and the decimal odds, net of a takeout.

Constant-product AMM & impermanent loss

Sell asset X into an $x\cdot y=k$ pool: see the output, the new spot price, and the impermanent loss an LP suffers for the resulting price move.

pm-AMM price curve

The pm-AMM price as a function of the reserve difference $y-x$, for liquidity scale $L$. Note the S-curve concentrating sensitivity around the 0.50 mark.