v1.0MIT LicenseSolana mainnetProgram GV1FM…N16y

Predict: a pm-AMM for prediction markets on Solana

Authors are the contributors with a merged pull request, synced live from GitHub.
Abstract Most prediction-market volume runs on order books, because generic AMMs are a poor fit for outcome tokens. Paradigm's pm-AMM fixes this: it is the AMM whose liquidity providers lose value at a uniform rate, whatever the price, and — in its dynamic form — whatever the time left. Predict is an open-source implementation of that paper on Solana. It is live on mainnet, supports five market types, ships a TypeScript SDK, and is looking for builders.

§1Why

Prediction markets need liquidity. Yet today, nearly all prediction-market liquidity sits on order books, not on automated market makers.

The reason is that outcome tokens don't behave like ordinary assets. A token that pays $1 if an event happens and $0 otherwise gets more volatile as the price nears 50% and as the deadline approaches. A constant-product pool (Uniswap-style) or Hanson's LMSR [3] provides liquidity that is badly matched to that behaviour: its liquidity providers bleed value unevenly, and they are all but guaranteed to lose everything at expiry.

In November 2024, Moallemi and Robinson at Paradigm derived an AMM designed for exactly this asset [1]. Using the loss-versus-rebalancing framework (LVR) [2], they define a uniform AMM: one whose expected losses to arbitrage are a constant fraction of the pool's value, regardless of the current price. For outcome tokens, that AMM is the pm-AMM.

Predict takes the paper off the page and puts it on Solana, as open infrastructure anyone can build on.

§2How it works

The model assumes the outcome is decided by whether some underlying score — a point difference, a vote margin, a price minus a strike — ends above zero. Under this Gaussian score dynamics model, the fair price of the YES token is

(1)

where Φ is the normal CDF. The static pm-AMM holds reserves x (YES) and y (NO) on the invariant

(2)

Its pool value is : liquidity is concentrated around 50% and withdrawn at the extremes, where a generic AMM would lose the most.

00.51 price of YES, P V T−t = 1½¼
Fig. 1 — Pool value V(P) = L·φ(Φ⁻¹(P)). Solid: static pm-AMM. Dashed: dynamic pm-AMM, whose liquidity is scaled by √(T − t) as expiry nears.

Static vs. dynamic

The static pm-AMM has uniform LVR across prices, but its losses still accelerate near expiry, when markets are most volatile. The dynamic pm-AMM withdraws liquidity over time to cancel that effect:

(3)

With this schedule, expected losses to arbitrage are constant over the life of the market, the expected pool value declines linearly, and LPs end with half of their initial wealth in expectation, rather than losing it all. On Predict, the withdrawn liquidity is released to LPs continuously as the market runs.

0T/2T time t Lₜ / L₀ = √(1 − t/T)E[Vₜ] / V₀ = 1 − t/T
Fig. 2 — Dynamic pm-AMM. Liquidity decays as √(T − t) (solid), so the expected pool value, net of withdrawals, decays linearly (dashed).

§3What's deployed

One Anchor program, 26 instructions, with USDC as collateral. The same program ID runs on devnet (for testing) and on mainnet.

Program IDGV1FMGHRYBjQLaghE5fnGuYCuCcpdt3GD5xEX3TwN16y
CollateralUSDC (mainnet) · mock USDC with a faucet (devnet)
Swap fee2% on the USDC leg · split 50% protocol / 50% market creator · YES↔NO swaps are free
Settlement1 winning token = 1 USDC, no fee · YES + NO can always be redeemed 1:1 for USDC
SolvencyEvery swap is checked on-chain: the vault must always cover every outstanding winning token
Tests266 (Rust unit, TypeScript integration, Python reference oracle)

Five market types

01BinaryYES / NO, seeded at 50%.
02Binary, custom seedStart at any price from 1% to 99%.
03Multi-outcome2 to 32 outcomes, each one a binary leg.
04Commitment vaultThe crowd commits USDC; the market launches once the target is met, and committers become its LPs.
05Multi-outcome vaultThe same crowd bootstrap, for 2 to 8 outcomes.

§4Build on it

The TypeScript SDK wraps all 26 instructions: typed reads, instruction builders, one-call helpers for the common path, and the pricing math with no chain dependency.

# install
pnpm add @pm-amm/sdk @solana/web3.js @anchor-lang/core @solana/spl-token
import { PmAmmClient } from "@pm-amm/sdk";

// create a market with $250 of starting liquidity
const { marketPda } = await client.send.createMarket({
  name: "Will BTC top $200k in 2026?",
  durationSecs: 7 * 86_400,
  initialPriceBps: 5000,   // start at 50% YES
  depositUsdc: 250,
});

// trade, provide liquidity, claim
await client.send.swap(marketPda, "usdcToYes", 10_000_000, minOut);
await client.send.depositLiquidity(marketPda, 100);
await client.send.claimWinnings(marketPda);

Vibe-coding it

The repo is written to be read by coding agents. Open it, start Claude or Codex, and point it at CLAUDE.md and llms.txt, a dense reference of every signature, type and recipe. You can go from zero to a working market on devnet in one session.

§5Contribute & get credited

Every contributor with a merged pull request is listed as an author at the top of this page. That is the deal.

The engine is solid. What's missing is everything built on top of it. Good places to start:

§6Objectives

  1. Become Solana's open base layer for prediction markets. One open engine that any front end, app or protocol can plug into, instead of every team rebuilding its own AMM.
  2. Grow builders, not a closed app. Predict succeeds when other people ship products on it, and when one of them takes the lead on the protocol.
  3. Hand the protocol to its community. Fees, treasury and roadmap governed by $PREDICT holders.

§7Limitations

Predict on mainnet is a trust-based proof of concept holding real money. These risks are known and accepted today. Each one is an open problem, and a good first contribution.

Centralized resolution.

The resolution authority picks the winning outcome. There is no oracle, timelock or dispute process yet.

Single-key upgrade authority.

One key can upgrade the program. There is no multisig yet.

No third-party audit.

The math is tested against a Python reference implementation of the paper, and every swap runs an on-chain solvency check, but no external firm has audited the code.

Multi-outcome drift.

The outcome probabilities are forced to sum to 1 only at seeding and at resolution. Between trades, that is left to arbitrage.

Also inherited from the model: the pm-AMM is optimal for markets that behave like a random walk (a basketball score, a vote margin), and less so for one-off surprises such as an earthquake happening before a date [1].

§8$PREDICT

$PREDICT is the governance token of the protocol, raised and governed through futarchy on Futard.io.

  • The DAO owns the protocol's share of swap fees: 50% of every fee.
  • Treasury and roadmap decisions go through decision markets.

Raise opens Monday 21 September, 18:00 CET. Cap: $10,000.

§9References

  1. C. Moallemi, D. Robinson. pm-AMM: A Uniform AMM for Prediction Markets. Paradigm, November 2024.
  2. J. Milionis, C. Moallemi, T. Roughgarden, A. L. Zhang. Automated Market Making and Loss-Versus-Rebalancing. arXiv:2208.06046, 2022.
  3. R. Hanson. Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation. Journal of Prediction Markets, 2007.
  4. Predict contributors. pm-AMM on Solana: source code, SDK and API reference. MIT License.