A prediction market for dopamine addiction.
You short-sell your friends' bad habits. Capital is minted by walking and burned by doomscrolling — so you have to stay off your phone to afford to bet that your friends won't.
The economy. Liquidity is capped by physical effort and drained by digital consumption.
- Proof of Walk — you earn
0.01credits per verified step - Doomscroll Burn — you lose
5.00credits per hour of screen time - The constraint — you must be active to afford to short anyone
The market. Each contract is a binary bet on one person clearing one
threshold, identified as (user, minutes) — alice,480 is "Alice stays
under 8 hours today."
- Long — bet they stay under
- Short — bet they fail
- Settlement — contracts resolve to exactly 0 or 1. No partial credit.
When the reported screen time crosses the threshold, the contract collapses to zero and every short gets paid.
- Matching engine — price-time priority, multi-market, integer cents
- Order book — custom linked-list book with an O(1) cancellation registry
- Economy — accounts, positions, available vs. locked balances
- Settlement — binary resolution against a reported threshold crossing
- Invariant auditing — cash conservation, position and registry integrity
- Simulation —
simulation.pydrives market activity and settlement end to end;benchmark.pyprofiles the engine under load - iOS client — SwiftUI, browses markets over raw TCP (newline-delimited JSON)
- Infrastructure — Docker Compose (
app+postgres), CI runningruff,mypy, and unit + integration tests
The exchange works. Nothing connects it to a real phone yet.
- The oracle — screen time currently arrives from
trigger_settle.py, a script with a hardcoded number. Nothing observes a real phone. - Proof of Walk — no
HealthKitintegration; steps are never read - The Snitch — no
DeviceActivityMonitor; nothing wakes on a threshold - Rust port — the matching engine is Python, and staying that way for now
- Persistence — state lives in
state.json; the PostgreSQL migration is the current focus
Apple's DeviceActivity API is deliberately privacy-preserving: it won't
export raw usage data or app names, so nothing can simply read your screen
time and report it.
The intended workaround is Proof of Portfolio — you pick a "portfolio of
shame" via FamilyActivityPicker, the app renders a sandboxed report of
those icons, and you export it to the group. Stuff it with Calculator and
Notes to game the burn rate, and you get delisted by hand.
python-prototype/logs/— six design decisions written up as they were made: order book structure, ID types, persistence, interface patterns, the iOS TCP client, and Postgres transactionsARCHITECTURE.md— system boundaries and data flowpython-prototype/— engine, book, economy, tests, and the simulation and benchmark scriptsios-client/— SwiftUI clientdocs/DEVELOPER_GUIDE.md— commands and workflowdocs/DOCKER.md— local containerized setup