20,855 shares traded · index 2,549.68 · top person c951c5a0 $16,411.10
A stock market in funny money: ten made-up companies, twenty bot traders, news that moves them, and $10,000 for you to trade alongside them.
What fold does here
Orders, cancels and trades are rows. Almost everything you see is a view over them: the order book in price and time order, best bid and ask, depth, last price and volume, one-minute candles, your cash and holdings, what you can still spend or sell, every portfolio's value, the index, and the two leaderboards.
Fold enforces the money: no cash or shares below zero, and nothing promised twice. An order that would overspend or sell shares you don't have is refused whole, trades and all.
Why it shows off fold
It uses most of fold at once. The money rules are rules over computed views, so there's no "check the balance, then trade" in the app that two orders could race past. Portfolios are a join of holdings and prices: one trade moves a price, and fold revalues everyone who holds that stock. The leaderboards are top-k views, kept sorted as values change rather than re-sorted. And because each order commits with all its trades in one transaction, nothing is ever half-filled on screen.
Worth trying
- Try to buy more than you can afford, or sell what you don't own: fold refuses, and Inspect names the rule.
- Open Inspect and watch the bots' ticks go in.
- Buy a stock just before news breaks and see where you land on the People board.
Still app code
Matching orders (price-time priority, partial fills), the bots, the hidden values and the news. Matching reads the book from fold and commits an order with its trades together. Old trades are settled into balances on a two-hour window, so the database stays bounded.
Press \ in the app to watch fold's commits as they happen.