Skip to content
amruth21Public

About

Prediction markets for your friend group — LMSR pricing, double-entry ledger, FastAPI + Next.js

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHALK

Prediction markets for your friend group. Real math, unserious subjects.

make setup    # python venv + npm install
make seed     # build the demo world
make dev      # api :8000, web :3100
make test     # engine properties + lifecycle
make check    # typecheck + ledger/bounds assertions

Sign in as any seeded handle (rohan, harpreet, kenji, …) with password hunter22.

  • /brand — the four brand directions, switchable live from the top-right bar
  • /style — the design system
  • /boot — the loading sequence

What's actually interesting

Pricing (services/engine/chalk/lmsr.py) is Hanson's LMSR. The creator's opening prior is injected as a seed vector q0 = b·ln(p0), which opens the book at exactly p0 and makes C(q0) = 0. The house's worst-case subsidy is closed-form and known before a single trade: b·ln(1/min p0). Liquidity scales with both crowd and horizon, b = (100 + 40√N)·(1 + 0.35·ln(1 + T/7)).

The ledger is append-only, enforced by SQLite trigger. A balance is never a column — it is SUM(delta) over that user's rows. Every posting is double-entry, so SELECT SUM(delta) FROM ledger_entry must always be exactly 0.

Sharpness is measured as edge, mean(outcome − price_paid), not Brier. Brier on price-paid rewards trading at extreme prices in either direction — buying 15¢ longshots that lose 85% of the time scores ~0.05 with no edge at all. See chalk/stats.py.

About

Prediction markets for your friend group — LMSR pricing, double-entry ledger, FastAPI + Next.js

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages