GradOrNot uses a Constant Product Automated Market Maker (AMM) to price YES and NO shares. This is similar to how Uniswap prices tokens, adapted for binary outcomes.
The AMM maintains virtual reserves of YES and NO shares. The price of each side is determined by the ratio of virtual reserves:
yes_price = no_supply / (yes_supply + no_supply)
no_price = yes_supply / (yes_supply + no_supply)
// Prices always sum to ~1.0
The AMM uses virtual reserves — there is no separate pool account holding real token liquidity. Instead, the market account tracks virtual YES and NO reserve numbers that determine price. To prevent extreme price swings on early trades, each market starts with a virtual liquidity offset so the first trader doesn't move the price from 0.50 to 0.99 in a single trade.
| State | YES Price | NO Price | Meaning |
|---|---|---|---|
| Fresh market | 0.50 | 0.50 | 50/50 odds |
| More YES buyers | 0.75 | 0.25 | 75% chance YES wins |
| Strong NO sentiment | 0.20 | 0.80 | 80% chance NO wins |
| Near certainty | 0.95 | 0.05 | Market very confident |