Bet (app)

1 language
  • Article
  • Read
From Wikipedia, the free encyclopedia
This article is about the replica. For a comparable public prediction market, see Polymarket.
Bet (app)
TypePrediction market
Replica ofPolymarket
DeveloperDavid
Written inNext.js, Hanson's LMSR pricing engine, fast-check property-based tests, in-memory store
Tests~664 unit/property/route tests
Built withA 14-task plan: implementer + independent reviewer + fix loop per task
Repository../bet
Websitehttps://bet-david.vercel.app

Bet is a play-money prediction-market application, developed in the bet folder of the Replicates repository, scoped to a friend group rather than the general public. Each market carries an embedded group chat, alongside a public, read-only Explore surface styled after a Polymarket/Kalshi hybrid.

Unauthorized reads of a market return a 404 status rather than a 403, because a 403 response would confirm the market's existence.

Overview

The store is in-memory and resets on a cold start. The application has no password authentication.

Pricing engine

Markets are priced with Robin Hanson's logarithmic market scoring rule (LMSR),[1] expressed as C(q) = b·ln Σ exp(qᵢ/b), rather than an order book. The project describes the rationale as: “a CLOB with six friends is an empty book.” Three pricing engines use a single shared interface: LMSR, fixed odds, and parimutuel.

Development

The replica carries ~664 unit/property/route tests, guarded in part by property-based tests written with fast-check that check pricing invariants; one round-trip property was strengthened after a bug was found in which Math.abs had been masking a sign-flip. It was built from a 14-task plan: implementer + independent reviewer + fix loop per task.

See also

References

  1. ^ Hanson, R. “Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation.” Journal of Prediction Markets, 2007.
  2. ^ bet/README.md.